Non recursive update with subrepo's

Matt Mackall mpm at selenic.com
Thu Jan 30 19:44:37 UTC 2014


On Thu, 2014-01-30 at 11:50 +0100, Raphael Sebbe wrote:
> That's actually the default behavior: "hg update" on parent also
> updates subrepos to their recorded versions. This is well documented,
> and works as expected. Having an example of that wouldn't bring
> interesting information IMO.
> 
> This is the right way of restoring a parent repository with all its
> subrepo to a given state. No problem on that. That's the "Restore"
> scenario.
> 
> My argument here is that there is another scenario, let call it "Daily
> Development", in which developers work on each repo and want to handle
> themselves the versions of each repo/subrepo (full control). However,
> in that use-case, whenever the parent repository is pulled/updated, it
> also updates the subrepo, which is cumbersome because developers have
> to go through each of the subrepo to update them back to the tip.

And I am saying (as the creator of both Mercurial and subrepos) that
THAT sounds like a bug. An update is supposed to be a merge between
whatever is in the update target and whatever has changed in the working
copy. If you've changed the state of a subrepo and update clobbers that
change without any sort of prompt or anything (and without you using
-C), then we have a bug.

This is different from the usual complaint we get that _update itself_
can't be made to grab the latest version, which is indeed something we
don't intend to support.

So again, can you make a simple test case for a bug report?

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list