[PATCH 1 of 3] pull: add --subrepos flag
Matt Harbison
matt_harbison at yahoo.com
Wed Feb 20 05:57:33 UTC 2013
On Sun, 17 Feb 2013 13:19:16 +0100, Angel Ezquerra wrote:
> # HG changeset patch
> # User Angel Ezquerra <angel.ezquerra at gmail.com>
> # Date 1360519226 -3600
> # Node ID abbd26cca35280fb8f784b3f2c02eef71696c47b
> # Parent 55b9b294b7544a6a144f627f71f4b770907d5a98
> pull: add --subrepos flag
>
> The purpose of this new flag is to ensure that you are able to update to any
> incoming revision without requiring any network access. The idea is to make sure
> that the repository is self-contained after doing hg pull --subrepos, as long as
> it already was self-contained before the pull).
>
> When the --subrepos flag is enabled, pull will also pull (or clone) all subrepos
> that are present on the current revision and those that are referenced by any of
> the incoming revisions.
I haven't gotten a chance to really play with this yet, so I'm going more off the
comments here- I apologize if these answers should be obvious, but I'm not familiar
enough with some of the code.
- Is there an easy way to tell if the repo is/was self contained? (Maybe
incoming -S?)
- Is the 'self-contained' bit to limit overhead on each pull, or is there another
reason this can't ensure the result is self contained? 'Push' and 'outgoing -S'
recognize (almost) everything going in the other direction, so it might be nice
to have the same capability with a form of pull. (I may have found a push bug
that I haven't gotten back to yet.)
- The full subrepo gets pulled, even revs not committed to the parent? I think
that's a good thing, because regularly get burned when I 'pull -u' the tree to
another machine and then go to apply the rest of a patch queue to the subrepo.
I'll try to experiment with this some in the next few days. I ran into issues with
what I'm working on (push, outgoing) with deeply nested subrepos, and also when a
parent locks in an earlier subrepo version. I wonder if deeply nested subrepos will
be a problem here since hgsubrepo.pull() doesn't walk its subrepos and pull them.
--Matt
More information about the Mercurial-devel
mailing list