<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 8, 2010, at 11:07 AM, Didly Bom wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Thu, Jul 8, 2010 at 4:43 PM, Matt Mackall <span dir="ltr">&lt;<a href="mailto:mpm@selenic.com">mpm@selenic.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Thu, 2010-07-08 at 15:58 +0200, Didly Bom wrote:<br>
&gt; On Thu, Jul 8, 2010 at 3:44 PM, Matt Mackall &lt;<a href="mailto:mpm@selenic.com">mpm@selenic.com</a>&gt; wrote:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; On Thu, 2010-07-08 at 15:24 +0200, Didly Bom wrote:<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; What about hg pull/push? As far as I know pull and push do<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; not<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &gt; currently work recursively, do they?<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Push does, pull is delayed until update time. See the list<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; archives for<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; rationale.<br>
&gt;<br>
&gt;<br>
&gt; Matt, I found the following quote from you:<br>
&gt;<br>
&gt;<br>
&gt; "We don't even know what subrepos to pull until update has occurred<br>
&gt; because the relevant data is stored in the target changeset."<br>
&gt;<br>
&gt;<br>
&gt; If that is what you refer to, I don't quite understand it. When you<br>
&gt; pull you simply get new revisions from the source repository, but you<br>
&gt; do not change the current revision unless you later do an update.<br>
&gt; Thus, when you do the pull, don't you already know which subrepos are<br>
&gt; currently (as in the current top repository revision) are included in<br>
&gt; the top repository? Thus, don't you already know the list of subrepos,<br>
&gt; for which you could then execute a pull?<br>
&gt;<br>
&gt;<br>
&gt; I don't really understand what has "update" to do with it at all.<br>
&gt; Would you care to explain it further?<br>
<br>
</div></div>The information about which subrepo to pull is stored in a file<br>
called .hgsub.<br>
<br>
There may be many versions of that file pointing to different subrepos<br>
in different places in many heads of many branches in the repository<br>
you're pulling/cloning. We won't know which .hgsub version is of<br>
interest until you decide to update.<br>
<br>
Further, we won't have anywhere to PUT those subrepos until an update<br>
anyway, because subrepos live in the working directory.</blockquote><div><br></div><div>Matt,</div><div><br></div><div>Thank you for trying to explain this to me. I&nbsp;think that I understand what you are saying. However, what I do not understand is the following:</div>
<div><br></div><div>- Assume that the user has cloned a repository that contains several subrepos.</div><div>- The user has then used "hg update" at least once, to &nbsp;select a revision to which its working copy will point to.</div>
<div><br></div><div>At this point, there is one and only one "current" .hgsub file. This file contains the list of the subrepositories that are referenced by the current revision of repository and to which folders they correspond to. It also says their corresponding "pull sources" (for lack of a better name).</div>
<div><br></div><div>Now, if the user executed "hg pull", wouldn't mercurial have all the information that it needs to perform the pull on all the subrepositories that are defined for the current revision of the top repository?</div></div></blockquote><div><br></div><div>It should never need to pull at this point.</div><div><br></div><div>When you run 'hg update REV' Mercurial clones/updates the subrepos to the revisions specified in the .hgsubstate file in REV.</div><div><br></div><div>When you run "hg pull" after that the .hgsubstate isn't touched (unless you're using "-u", but that's beside the point), so the revisions listed for each subrepo haven't changed, so it doesn't need to pull.</div><br><blockquote type="cite"><div class="gmail_quote">
<div><br></div><div>Obviously, if the user were to update the top repository to another revision, the whole subrespository list could have completely have changed, and a new pull on each subrespository may be needed. Mercurial may even need to remove some subrepos which are not longer included in the new selected revision of the top repository.</div>
<div><br></div><div>Sorry if this seems obvious to you...</div><div><br></div><div>Angel</div><div><br></div></div>
_______________________________________________<br>Mercurial-devel mailing list<br><a href="mailto:Mercurial-devel@selenic.com">Mercurial-devel@selenic.com</a><br>http://selenic.com/mailman/listinfo/mercurial-devel<br></blockquote></div><br></body></html>