Subrepository remapping plan

Didly Bom didlybom at gmail.com
Wed Aug 18 03:58:15 CDT 2010


2010/8/18 Martin Geisler <mg at lazybytes.net>

> Didly <didlybom at gmail.com> writes:
>
> Hi Didly
>
> > Some additional thoughts:
> >
> > - An additional drawback of not being able to use "partial
> > substitutions" would be that it would make it harder “but not
> > impossible) to switch back and forth between two subrepository source
> > "roots". For example, imagine that your primary server went down and
> > you wanted to start using an alternative mirror server until the
> > primary server was up again. With partial substitutions this could be
> > as simple as making a single mapping, which you could probably reuse
> > for all your repositories. With the proposed solution you would need
> > to make a lot of individual mappings concering every subrepo used in
> > every repository.
>
> Did you have a change to checkout the remapping functionality I pushed
> recently? It's still described here:
>
>  http://mercurial.selenic.com/wiki/SubrepoRemappingPlan
>
> > - In the wiki you explain that the subpaths file is propagated to the
> > clients automatically on pull. However, it is unclear (to me) what
> > would happen on push. Could a careless or uninformed developper change
> > everybody's subrepo mappings by pushing his customized subpaths file
> > to the central repository?
>
> So far the plan is to only propagate changes on pull. So the project
> admin would install a .hg/subpaths file manually in the central
> repository.


Hi Martin,

I just reviews the updated proposal and overall I think it is very nice
although I have a couple of comments:

- I am worried about how would back-references work in windows, where there
can be paths such as "C:\workspace\1". Perhaps the documentation should
explicitly state that paths should use "/" rather than "\", even on windows?

- I am not sure that applying substitutions on top of each other by default
is a good idea. For example, in your own example, you have the following
configuration:


.hgsub:
libs/foo = libfoo

.hg/subpaths:
libfoo = http://server.com/libfoo

.hg/hgrc:
[subpaths]
^http://server.com/ = ssh://localhost:1234/

Now imagine that the adminstrator of the central repo changes the
.hg/subpaths file to:

.hg/subpaths:
libfoo = http://newserver.com/libfoo

Wouldn't that break the local .hg/hgrc subpaths mapping?


Cheers,

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


More information about the Mercurial-devel mailing list