Recursive pull on subrepos
mg at lazybytes.net
Sun Sep 4 07:42:47 CDT 2011
Andreas Reichel <andreas at manticore-projects.com> writes:
> [...] REPO_A changes only, when adding another SUBREPO. Also I work on
> many SUBREPOs in parallel. So I would like to synchronize all the
> SUBREPOs quite often. While "hg push" works very well, "hg pull" does
> not work recursively. To ease the pain I wrote a script like:
> while read LINE
> DEST=`echo $LINE | cut -d '=' -f 1 | sed 's/^ *//;s/ *$//'`
> REPO=`echo $LINE | cut -d '=' -f 2 | sed 's/^ *//;s/ *$//'`
> hg pull -u --cwd $DEST $REPO
> done < .hgsub
> and I wonder if this could be integrated into the mercurial directly. I
> understand there are reasons, when you do not like to pull the SUBREPOs
> (well, honestly I do not -- but I can accept of course)
The reason is that it is not known what to pull until you do 'hg
update'. It is only at that point that we know the content of the .hgsub
and .hgsubstate files and so know what revisions to pull and from where.
There are more about this in the archives.
> but please understand there are also situations where you like to pull
> all SUBREPOs and it is a lot of overhead to pull 20 SUBREPOs manually.
> At least any kind of extension would be great!
Use the onsub extension I wrote:
That lets you do 'hg onsub "hg pull -u"' to recursively update all
Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the Mercurial-devel