Subrepos and diff command
mg at aragost.com
Mon Oct 24 04:38:53 CDT 2011
Patrick Mézard <pmezard at gmail.com> writes:
> Le 21/10/11 18:47, Eric ROSHAN EISNER a écrit :
>> On Fri, Oct 21, 2011 at 09:07, Patrick Mézard <pmezard at gmail.com <mailto:pmezard at gmail.com>> wrote:
>> Well you're doing two different things with the recursive commit, so
>> I think it's reasonable to ask the two repos separately to get the
>> two different answers.
>> $ hg diff -S # effect on root repo
>> $ cd sub
>> $ hg diff # effect on sub repo
>> $ hg commit -m b2 # manual recursive commit
>> $ cd ..
>> $ hg diff -S
>> Importantly, it is consistent that a diff -S in the root repo gives
>> the same result before and after the inner commit, because they end
>> up with the same contents. I agree this is a bit confusing, but it
>> reflects the confusing nature of recursive commit.
> Right, I agree this approach gives well defined, consistent results. I
> guess "hg status -S" will do the same, again for consistency.
It does give the same consistent results -- and people are confused
about it for the same reasons.
Eric's description is really good: 'hg status -S' shows that happens as
seen from the outer repository, 'cd sub; hg status' shows what happens
from the subrepo.
Professional Mercurial support
More information about the Mercurial-devel