Subrepos and multiple top repos
didlybom at gmail.com
Wed Jun 1 13:01:56 CDT 2011
On Wed, Jun 1, 2011 at 8:35 AM, Martin Geisler <mg at lazybytes.net> wrote:
> Mathias De Maré <mathias.demare at gmail.com> writes:
>> I currently see the following options:
>> - store all the repositories in the same top-level directory, and put
>> symlinks in the top repositories to the subrepositories
>> - patch the server to always return a top-level directory, even when clients
>> request a subrepository down a few levels
>> Both of these seem quite annoying.
>> - The first requires adding new symlinks whenever a new subrepository is
>> added (or moved from one directory to another!).
> You'll need to log into the server anyway in this case: you cannot
> create new (sub)repositories on a server without a login.
> Your options are:
> * symlinks
> * the share extension (sort of in-Mercurial symlinks between .hg folders)
> * let hgweb export the same repository under several different paths
> Those three ways will let clients clone subrepos using trivial subrepo
> paths and there will only be one repo on the server.
>> One thing that seemed like an interesting idea is to expand .hgsub to a new
>> directory = firstdirectory;seconddirectory
>> Suppose A has a subrepository W in directory foo/bar, and on the
>> central, it's stored in the same directory as A. Then .hgsub could be:
>> foo/bar/W = foo/bar/W;../W
An alternative would be to allow "declaring" a subrepo multiple times
(in several lines), each time with a different pull source. This would
be pretty similar to how it is possible to have multiple tags on the
.hgtags file. Mercurial could then try those sources in order (from
latest to newest).
More information about the Mercurial