[patch 4/4] This adds support for an [extensions] section to
hgrc. This has the form of:
Chris Mason
mason at suse.com
Sat Aug 13 09:38:51 CDT 2005
On Sat, 2005-08-13 at 14:50 +0200, Robin Farine wrote:
> But if an extension module like Chris' mq has to subclass
> localrepository to add extension-specific state to repo objects,
> what happens when two or more such extensions have to coexist? This
> indicates that extensions must not subclass localrepository.
>
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(""))
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.
I hesitate to add lots of infrastructure for the extensions until people
bring forward more extension ideas.
-chris
More information about the Mercurial
mailing list