<br><br><div class="gmail_quote">On Fri, Mar 25, 2011 at 5:45 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 class="im">On Fri, 2011-03-25 at 17:27 +0100, Martin Geisler wrote:<br>
&gt; Matt Mackall &lt;<a href="mailto:mpm@selenic.com">mpm@selenic.com</a>&gt; writes:<br>
&gt;<br>
&gt; &gt; On Fri, 2011-03-25 at 16:07 +0100, Martin Geisler wrote:<br>
&gt; &gt;&gt; # HG changeset patch<br>
&gt; &gt;&gt; # User Martin Geisler &lt;<a href="mailto:mg@aragost.com">mg@aragost.com</a>&gt;<br>
&gt; &gt;&gt; # Date 1300989966 -3600<br>
&gt; &gt;&gt; # Node ID a8019f68e1463d6b1d5406f5f22d17f9aa8c828c<br>
&gt; &gt;&gt; # Parent  e45780ac829283080ad6b5a5e064e59a163c08d6<br>
&gt; &gt;&gt; subrepo: look for local pull source first<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; With this change, a subrepository will always try to find the<br>
&gt; &gt;&gt; changesets it needs in a repository relative to the pull source of the<br>
&gt; &gt;&gt; top-most parent repository. So if we have<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;   repo/<br>
&gt; &gt;&gt;     sub/<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; and make a clone with &#39;hg clone repo clone&#39;, then clone/sub will pull<br>
&gt; &gt;&gt; in changesets from repo/sub, regardless of what the .hgsub file says.<br>
&gt; &gt;<br>
&gt; &gt; There&#39;s a lot that&#39;s weird with this.<br>
&gt; &gt;<br>
&gt; &gt; Consider how completely different the behavior will be if you manually<br>
&gt; &gt; run hg pull in a subrepo vs having the subrepo code do it for you. I<br>
&gt; &gt; think this issue by itself is a show-stopper.<br>
&gt;<br>
&gt; It is not really different from what happens today if you do<br>
&gt;<br>
&gt;   $ hg pull --update /foo<br>
<br>
</div>Show is still stopped. Address the point I raised, pleased. It makes<br>
absolutely no sense for a manual pull in a subrepo directory to do<br>
something completely different BY DEFAULT than what an automatic pull of<br>
the same repo via the subrepo code would do BY DEFAULT. That can only<br>
cause problems.<br>
<br>
Pull --update &lt;some arg&gt; is a completely different beast that is<br>
explicitly overriding the defaults.<br>
<div class="im"><br>
--<br>
Mathematics is the supreme nostalgia of our time.<br>
<br>
<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">Mercurial-devel mailing list<br>
<a href="mailto:Mercurial-devel@selenic.com">Mercurial-devel@selenic.com</a><br>
<a href="http://selenic.com/mailman/listinfo/mercurial-devel" target="_blank">http://selenic.com/mailman/listinfo/mercurial-devel</a><br>
</div></div></blockquote></div><br>Matt,<br><br>you are right that this does not make much sense but it is actually exactly what happens today!<br><br>When I started using suprepos the most surprising thing for me was that the pull source for the subrepos was not the default pull source specified in the subrepo .hgrc file, but instead that it was set in stone in the .hgsub file.<br>
<br>The result of this (weird, IMHO) design is that as you just said pulling from within a subrepo my use a completely different source that would be use when pulling that same subrepository through a pull operation on its parent repository! This is I think a big gotcha of the current suprepo implementation.<br>
<br>I always wondered why isn&#39;t it possible have an .hgsub file in which no pull source is set. In that case mercurial could do what Martin is suggesting, i.e. use the subrepo default pull source.<br><br>Angel<br><br>
<br>