tags:

views:

51

answers:

1

Him

I have two hg repositories.

main/lib

main/application

I think I would like to have a checkpoint so that I can store the state of lib and application at one time.

I read there is a concept of subreposities... I had an idea to create a third repository in main in which I could store the needed state... What would you recommend to use for it? I could not add files of lib and application to main.

How would you do it?

+2  A: 

Hello,

This should work:

$ cd main
$ hg init
$ echo "lib = lib
application = application" > .hgsub
$ hg add
$ hg commit -m"Added lib and main as subrepos"
$ hg clone . ssh://hg@mercurialserver/main

Then you can use main as a container of lib and application, but there are some restrictions (check the questions here for more details). E.g., push will recurse but not pull. Also if you checkout "main", lib and application will exist but will be "empty", you have to do hg -R lib pull and hg -R application pull in order to get the history in a local clone.

Hope it'll help. (I'm currently testing the feature as well.. ;-) )

Cheers,
Christophe.

= Every ten thousand miles trip begins with a single step --Lao Tze =

Christophe Muller