[PATCH] status: add option to show status of files in subrepos

Steve Borho steve at borho.org
Thu Jul 8 22:39:40 CDT 2010


On Thu, Jul 8, 2010 at 7:17 PM, Nicolas Dumazet <nicdumz at gmail.com> wrote:
> You might still not understand.
>
> Say you friends adds in his clone rev X.
> .hgsub is:
>  nested = http://path/to/a/repo
>
> Then, he commits rev X+1
> .hgsub is
>    nested = http://another/path/to/a/repo
>    foobar = file://bla/meh
>
> (And I'm lazy and provide you with only two revisions, but you have to
> understand, as Matt says, that we can have several heads, several
> branches, and thousands of changesets)
>
> You are asking asking if we can pull subrepos when we pull the main
> repo. The simple answer is "no".
> When you pull the main repo, from a subrepo prespective you "only" get
> a lot of new revisions for .hgsub and .hgsubstate
> At _pull_ time, we dont know what revisions we will update to in the
> main repo. We thus dont know what revision of .hgsub and .hgsubstate
> you are interested into.

Uhm, that's why I said it only made sense if you do not allow --update
and --recurse at the same time.  Assume you are only pulling and not
updating.  .hgsub is stable; the entire nested list of subrepo paths
is stable.

> You want a toplevel pull to clone/pull the subrepos.
> * Actually, pull in the main repo does not even know _which_ repo to
> pull. Should we clone http://path/to/a/repo ?
> http://another/path/to/a/repo ? file://bla/meh ? Two of those? All
> three?
> * As Matt wrote, subrepos are stored in the working directory. No copy
> of the subrepos (for now) lives in .hg; and we just clone them in
> ./nested and ./foobar when we are asked to fetch the repos. Because of
> this reason, pulling subrepos sounds non-trivial.

No working directories are harmed in the making of this pull :)

> So maybe the right question to ask would be "hey, but in most
> repositories, we will use at most X subrepo sources, where X is a
> rather small-ish number. Why dont we completely clone those X subrepos
> sources at pull time, in say, .hg/subrepos/ so we can retrieve the
> changesets we're interested in, when updating? Or at least provide a
> configuration option to let the user pick if we should do it or not?"
> I dont know for sure, but I think that the answer to this question is
> "because we only want information related to toplevel repo to be
> inside .hg".

This sounds needlessly complicated.

-- 
Steve Borho


More information about the Mercurial-devel mailing list