Is there any way to configure Mercurial to push a subrepository to the same path specified when pushing its parent?
Say we have a parent repo with a subrepo, and the subrepo also has its own subrepo:
A
- B
- - C
Now, in each of A, B, and C we have alternate paths specified:
A .hg/hgrc
[paths]
default = http://path.to.default/A
devMachine = ssh://user@dev.machine/A
B .hg/hgrc
[paths]
default = http://path.to.default/B
devMachine = ssh://user@dev.machine/A/B
C .hg/hgrc
[paths]
default = http://path.to.default/C
devMachine = ssh://user@dev.machine/A/B/C
If I have unpublished changesets in A, B, and C, that I do not want to push to the central repository, but I DO want to push them between my Work & Home dev machines, is there any way I can set up Mercurial such that when I do hg push devMachine
it will push B and C to devMachine
as well, rather than pushing A to devMachine
and pushing both B and C to default
?
What I have been doing thus far is setting the new-commit phase to secret
and doing:
$ cd A/B/C
A/B/C$ hg phase -d
A/B/C$ hg push devMachine
A/B/C$ hg phase -sf
A/B/C$ cd ..
A/B$ hg phase -d
A/B$ hg push devMachine
A/B$ hg phase -sf
A/B$ cd ..
A$ hg phase -d
A$ hg push devMachine
A$ hg phase -sf
For obvious reasons this is less than optimal. It would be much nicer if doing A$ hg push devMachine
would recursively push all subrepos to the devMachine
path (given that it has been defined in .hg/hgrc of course).
I know I could script this pretty easily. I'm just curious if Mercurial has something built-in that will do this that I haven't been able to find.