[patch 4/4] This adds support for an [extensions] section to hgrc. This has the form of:

Robin Farine robin.farine at terminus.org
Sat Aug 13 10:52:22 CDT 2005


On Saturday 13 August 2005 16.38, Chris Mason wrote:

> There are quite a few options here.  We can keep my current patch with
> the reposetup() call and have mq do this instead:
> 
> repomap = {}
> 
> def pop(ui, repo, patch=None, **opts):
>     """pop the current patch off the stack"""
>     if opts['all']:
>         patch = repomap[repo].series[0]
>     repomap[repo].pop(repo, patch, force=opts['force'])
> 
> def reposetup(ui, repo):
>     repomap[repo] = queue(ui, repo.opener, repo.join(""))

Yes, it looks good.

> This way I'm not messing around in the repo object.  If people want
> extensions that really need to subclass localrepository, we can add
> Bryan's code later.

As I said, I find Bryan's code fine to handle the special case of
accessing remote repositories, but I think this is completely orthogonal
to the question of subclassing or not subclassing localrepository.

Let's consider the subset of the extensions that subclass localrepository
and assign a repository factory function to the shared protocols['file']
slot. Objects representing local repositories would then fulfill the
requirements of one extension only and break all the others', which
implies that only one of such an extension can be loaded at time. At
least that is how I understand it.

Robin


More information about the Mercurial mailing list