<tt><font size=2>Martin Geisler &lt;mg@aragost.com&gt; wrote on 06/14/2011
03:37:55 AM:<br>
<br>
&gt; From: Martin Geisler &lt;mg@aragost.com&gt;</font></tt>
<br><tt><font size=2>&gt; To: paul_nathan@selinc.com</font></tt>
<br><tt><font size=2>&gt; Cc: mercurial@selenic.com</font></tt>
<br><tt><font size=2>&gt; Date: 06/14/2011 03:38 AM</font></tt>
<br><tt><font size=2>&gt; Subject: Re: hg diff in the presence of subrepositories</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; paul_nathan@selinc.com writes:<br>
&gt; <br>
&gt; Hi Paul<br>
&gt; <br>
&gt; &gt; I am working to deploy Mercurial in my company using subrepositories<br>
&gt; &gt; to manage our modules, and I am providing support for developers.<br>
&gt; &gt;<br>
&gt; &gt; Our repositories are structured along the lines recommended by
mpm[1].<br>
&gt; &gt;<br>
&gt; &gt; toplevel/<br>
&gt; &gt; &nbsp; &nbsp; ./module<br>
&gt; &gt; &nbsp; &nbsp; ./module<br>
&gt; &gt; &nbsp; &nbsp; ./productcode<br>
&gt; &gt; &nbsp; &nbsp; ./otherproductcode<br>
&gt; <br>
&gt; Sounds good.<br>
&gt; <br>
&gt; &gt; [...] And the conversation continues as I explain the operation
of the<br>
&gt; &gt; .hgsubstate file and how it records the state of the subrepos,
but<br>
&gt; &gt; only on commit.<br>
&gt; <br>
&gt; So I take it that you would also find it natural if Mercurial would<br>
&gt; update the .hgsubstate file *on disk* when it notices that it is out
of<br>
&gt; date with regard to a subrepository?<br>
&gt; <br>
&gt; Right now the .hgsubstate file is written to disk in the middle of
the<br>
&gt; top-level commit and the current content is actually ignored. It would<br>
&gt; make a lot of things more natural if the .hgsubstate file was really<br>
&gt; modified on disk: both 'hg status' and 'hg diff' would suddenly work
out<br>
&gt; of the box with subrepos and you could clearly see what the old and
the<br>
&gt; new subrepo revisions are.<br>
&gt; </font></tt>
<br>
<br><tt><font size=2>Substate describing the *current* substate of the
repositories would fit the</font></tt>
<br><tt><font size=2>abstraction presented quite well. Certainly in this
scenario, it would fix</font></tt>
<br><tt><font size=2>the issue. </font></tt>
<br>
<br><tt><font size=2>I am not sure what else it would affect. </font></tt>
<br>
<br><tt><font size=2>However, if I understand the hg design correctly,
that would require diff/status </font></tt>
<br><tt><font size=2>traversing subrepositories every time they are called
to verify change. </font></tt>
<br><tt><font size=2><br>
&gt; &gt; The problem is:<br>
&gt; &gt;<br>
&gt; &gt; Notice that there is an inconsistency of operation here: hg diff
is<br>
&gt; &gt; not telling the user that there really is a difference in the
world of<br>
&gt; &gt; the top repository. Nor is hg status. Yet, the connotation and<br>
&gt; &gt; denotation of the words say that they tell you the status and
the<br>
&gt; &gt; difference. But they return that there is _no_ difference.<br>
&gt; &gt;<br>
&gt; &gt; While this may make sense from an implementation standpoint (and
it<br>
&gt; &gt; does, if I think like an implementer), I have received this question<br>
&gt; &gt; from multiple people who are experienced, skilled and qualified<br>
&gt; &gt; software engineers who have used other version control systems<br>
&gt; &gt; (ClearCase, SVN, git).<br>
&gt; &gt;<br>
&gt; &gt; From my perspective as a support person for hg in my company,
this is<br>
&gt; &gt; essentially a bug in the user experience and user interface.<br>
&gt; <br>
&gt; I agree with you here, the subrepo UI is still buggy. I've worked
with a<br>
&gt; client to improve this (we got the --subrepos flags added to a number
of<br>
&gt; commands) but it is still not perfect.<br>
&gt; <br>
&gt; The &quot;invisible&quot; .hgsubstate file and the resulting inconsistency
between<br>
&gt; status/diff and commit is probably the biggest remaining problem for
my<br>
&gt; client. We'll probably work on a getting a temporary ui setting into<br>
&gt; Mercurial that will make things consistent, but that is still under<br>
&gt; discussion.</font></tt>
<br>
<br><tt><font size=2>I'd love to see that come into being. What would it
take?</font></tt>
<br>
<br><font size=2 face="sans-serif">- - -<br>
Regards,<br>
Paul Nathan</font>
<br>