No subject


Tue Mar 8 16:51:07 UTC 2011


what most people should use in most cases. However that is not totally clear
(IMHO) when you start using subrepos. The fact that you _have_ to specify a
pull source is in itself confusing and leads you to wonder whether you
should use absolute paths, etc.

It'd be great if rather than using "sub = sub" in your .hgsub file you could
also simply use "sub" (without a source), meaning the same as "sub = sub".
You could then tell people that to add a subrepo they simply must add its
relative path to the .hgsub file and that would be it. Advanced users could
always discover the "advanced" subrepo feature that lets you select a surepo
source on the .hgsub file if they ever needed it.

Angel

--0003255550562552d4049f5758a5
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Sat, Mar 26, 2011 at 12:18 AM, Martin Geisler=
 <span dir=3D"ltr">&lt;<a href=3D"mailto:mg at lazybytes.net">mg at lazybytes.net=
</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin=
:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">Didly &lt;<a href=3D"mailto:didlybom at gmail.com">didlybom@=
gmail.com</a>&gt; writes:<br>
<br>
&gt; When I started using suprepos the most surprising thing for me was<br>
&gt; that the pull source for the subrepos was not the default pull source<=
br>
&gt; specified in the subrepo .hgrc file, but instead that it was set in<br=
>
&gt; stone in the .hgsub file.<br>
<br>
</div>Well the .hgsub file also gives you some flexibility to move things<b=
r>
around: if you change servers, then you update the .hgsub file<br>
accordingly to enable new clones.<br>
<div class=3D"im"><br>
&gt; The result of this (weird, IMHO) design is that as you just said<br>
&gt; pulling from within a subrepo my use a completely different source<br>
&gt; that would be use when pulling that same subrepository through a pull<=
br>
&gt; operation on its parent repository! This is I think a big gotcha of<br=
>
&gt; the current suprepo implementation.<br>
&gt;<br>
&gt; I always wondered why isn&#39;t it possible have an .hgsub file in whi=
ch<br>
&gt; no pull source is set. In that case mercurial could do what Martin is<=
br>
&gt; suggesting, i.e. use the subrepo default pull source.<br>
<br>
</div>It is sort of possible: use trivial paths of the &#39;sub =3D sub&#39=
; form. That<br>
makes Mercurial pull from the repository in-place.<br>
<br>
You are right that my patch will make it try that first, and then<br>
fallback on the URL in the .hgsub file -- that way you can make the<br>
initial clone where you might have to rely on &#39;sub =3D ../sub&#39; styl=
e<br>
paths, and then you can make further clones from that local clone.<br></blo=
ckquote><div><br>From my own experience using subrepos, I think that the &q=
uot;sub =3D sub&quot; model is what most people should use in most cases. H=
owever that is not totally clear (IMHO) when you start using subrepos. The =
fact that you _have_ to specify a pull source is in itself confusing and le=
ads you to wonder whether you should use absolute paths, etc.<br>
<br>It&#39;d be great if rather than using &quot;sub =3D sub&quot; in your =
.hgsub file you could also simply use &quot;sub&quot; (without a source), m=
eaning the same as &quot;sub =3D sub&quot;. You could then tell people that=
 to add a subrepo they simply must add its relative path to the .hgsub file=
 and that would be it. Advanced users could always discover the &quot;advan=
ced&quot; subrepo feature that lets you select a surepo source on the .hgsu=
b file if they ever needed it.<br>
<br>Angel<br><br></div></div>

--0003255550562552d4049f5758a5--


More information about the Mercurial-devel mailing list