hg diff in the presence of subrepositories

Martin Geisler mg at aragost.com
Wed Jun 15 09:50:58 CDT 2011


paul_nathan at selinc.com writes:

> Substate describing the *current* substate of the repositories would
> fit the abstraction presented quite well. Certainly in this scenario,
> it would fix the issue.
>
> I am not sure what else it would affect.
>
> However, if I understand the hg design correctly, that would require
> diff/status traversing subrepositories every time they are called to
> verify change.

That is true -- Mercurial would have to spend time recursing into
subrepos to figure out if they are dirty or not. It could stop at the
first dirty file, though since the dirty-ness is all that is needed.

If a subrepo is dirty, then the changeset ID in the .hgsubstate file
could be updated with a '+', similarly to how 'hg id' works. Infact,
this should be just like running 'hg id' inside each subrepo and storing
the output of that in the .hgsubstate file.

> Martin Geisler <mg at aragost.com> wrote on 06/14/2011 03:37:55 AM:
>
>> The "invisible" .hgsubstate file and the resulting inconsistency
>> between status/diff and commit is probably the biggest remaining
>> problem for my client. We'll probably work on a getting a temporary
>> ui setting into Mercurial that will make things consistent, but that
>> is still under discussion.
>
> I'd love to see that come into being. What would it take?

Well, someone would need to sponsor the work to make the commands
consistent -- feel free to contact me off-list if you are interested in
this. We had a big discussion about the plan here:

  http://mercurial.markmail.org/message/bhp4yfyxk5qitvgz

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://mercurial.aragost.com/kick-start/


More information about the Mercurial mailing list