Subrepository remapping plan

Didly didlybom at gmail.com
Fri Jul 23 07:59:10 CDT 2010


On Fri, Jul 23, 2010 at 1:47 PM, Dirkjan Ochtman <dirkjan at ochtman.nl> wrote:

> On Fri, Jul 23, 2010 at 13:38, Martin Geisler <mg at aragost.com> wrote:
> > I've made a wiki page that describes what I'm planning on implementing
> > for remapping URLs in the .hgsub file:
> >
> >  http://mercurial.selenic.com/wiki/SubrepoRemappingPlan
> >
> > Please take a look and tell me if you think this will solve your
> > problems. The plan comes from the company that has hired me to implement
> > this, and we believe it will solve their problems.
>

Nice! I have a few quick comments that I'll explain in a separate email, but
I'd like to answer to some of Dirkjan's comments first.

On Fri, Jul 23, 2010 at 1:47 PM, Dirkjan Ochtman <dirkjan at ochtman.nl> wrote:

> I'm missing two things from this page:
>
> - Why do we need the separate subpaths file? If that's because we
> don't consider hgrcs writable and we want pushkey-based distribution,
> that's fine, but it would be nice to have stated explicitly (it could
> also help to reorder so that the existence of the subpaths file is
> more clearly related to the distribution section).
>

That seems to be the original intent of what was discussed on the mailing
list, but as you said it should be said explicitly on the wiki.

- Why do we need the intermediate key "libfoo"? It seems like we could
> just use the in-repo path to the subrepo to key off of (i.e. the
> subpaths file or hgrc would have lib/foo =
> http://hg.company.com/libraries/libfoo). It might change location in
> the repo, but it wouldn't be hard to add an extra mapping entry (the
> libfoo is also prone to being renamed at some point).
>

I believe that the reason for the intermediate key "libfoo" is not really
stated on the wiki and it is that (at least originally) the subpath entries
are meant to be used to substitute the beginning of the source paths, rather
than the full source paths. That is, if your hgsub file was:

libfoo = libfoo/my/custom/path/to/libfoo

then setting a subpaths mapping such as:
libfoo = http://myserver/libfoo

would be equivalent to having the following hgsub file:

libfoo = http://myserver/libfoo/my/custom/path/to/libfoo

Martin, is that right? If so, this should be explained on the wiki as well.

Cheers,

Angel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100723/c04ba4e5/attachment.htm>


More information about the Mercurial-devel mailing list