I have a mercurial repo structured as follows:
/parent
/child1
/child2
with the following webconfig file for hg serve:
[paths]
/ = ./*
/parent/child1 = ./parent/child1/*
/parent/child2 = ./parent/child2/*
[web]
allow_push = *
push_ssl = false
I want to be able to clone /parent/child1 or /parent/child2 and update them, then later clone /parent and have all the changes from the children. Preferably showing the commits for the children as well.
I'd also like to be able to easily add /grandchild to one of the children at any time and have it function the same as the children (can clone parent or child folder and get all changes)
The current setup will let me clone the children as I want, but any changes are not reflected in the parent repository.
I'm using hg server --web-config to serve these repos.
I believe I need to use .hgsub to achieve these results, but I'm not sure how and most of the places I find with info link to the old mercurial website, which now doesn't exist.
Other subrepo related configs I've found are just for mapping /parent/child1 to /child1 (I will have a lot of subrepos that may be named similar or the same, so I'd prefer not to have each available in the base) or for mapping someone else's repo as a dependency.
This is an example of what I'd like to be able to do (cmd example):
hg clone http://server/parent/child1 child1
cd child1
echo changes >file1.txt
hg commit -m "changes to child1"
hg push
cd ..
hg clone http://server/parent parent
cd parent/child1
echo new changes >>file1.txt
hg commit -m "changes to child1 again"
hg push
cd ../../child1
hg pull -u
type file1.txt
which should print
changes
new changes
Is this possible with mercurial serve? How can I achieve what I want with a web config? I'm still setting up my mercurial server, so I don't need to worry about history.
If it's not possible, is there another version control software that can do as I need?