[PATCH 1 of 5 V2] pull: add --subrepos flag

Matt Mackall mpm at selenic.com
Tue Apr 16 18:39:02 CDT 2013


On Sun, 2013-03-03 at 22:05 +0100, Angel Ezquerra wrote:
> # HG changeset patch
> # User Angel Ezquerra <angel.ezquerra at gmail.com>
> # Date 1360519226 -3600
> # Node ID c5e164d3282a4a2fb54171e6246b3b2e8a520080
> # Parent  a07be895373394be66ba38b1ff111e26aca03ac8
> 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 was already 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.

Sorry for the long wait on this one.

I'm afraid this is not quite what I'd envisioned. I was expecting it to
just visit heads or even just the head we're likely to update to. 

The largefiles code has a similar issue of having bits that might want
to be pulled before we disconnect and they've gone through a couple
iterations of approaches before finally arriving at:

- only pull what we're going to need for update
- have a separate flag that specifies how to pull more (--lfpull)

I think -S shouldn't try to be fancy for now: just recurse the current
subrepos in the working dir and pull. Then there's no question of
"what's going to get pulled", "where we're going to put it", and "what
do we do if sources conflict", which are big unsolved problems.

It might not work when we next try to update. Oh well.

Generally speaking, pulling every subrepo referenced in history isn't
even going to work for a lot of people: they've committed broken .hgsub
files at some point or the repos have moved.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list