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"><<a href=3D"mailto:mg at lazybytes.net">mg at lazybytes.net=
</a>></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 <<a href=3D"mailto:didlybom at gmail.com">didlybom@=
gmail.com</a>> writes:<br>
<br>
> When I started using suprepos the most surprising thing for me was<br>
> that the pull source for the subrepos was not the default pull source<=
br>
> specified in the subrepo .hgrc file, but instead that it was set in<br=
>
> 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>
> The result of this (weird, IMHO) design is that as you just said<br>
> pulling from within a subrepo my use a completely different source<br>
> that would be use when pulling that same subrepository through a pull<=
br>
> operation on its parent repository! This is I think a big gotcha of<br=
>
> the current suprepo implementation.<br>
><br>
> I always wondered why isn't it possible have an .hgsub file in whi=
ch<br>
> no pull source is set. In that case mercurial could do what Martin is<=
br>
> suggesting, i.e. use the subrepo default pull source.<br>
<br>
</div>It is sort of possible: use trivial paths of the 'sub =3D sub'=
; 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 'sub =3D ../sub' 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" 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'd be great if rather than using "sub =3D sub" in your =
.hgsub file you could also simply use "sub" (without a source), m=
eaning the same as "sub =3D 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 "advan=
ced" 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