[PATCH] Allow explicit disabling of extensions

Steve Borho steve at borho.org
Mon Oct 15 20:31:38 CDT 2007


This doesn't qualify as an urgent patch.  It hardly tops 'would be nice'
on the priority meter, but I would like it to be considered.

My initial reasoning here:
http://marc.info/?l=mercurial&m=119009384627980&w=2

And a few more comments here:
http://www.selenic.com/pipermail/mercurial-devel/2007-September/003023.html

I know there's a certain hackish quality to the patch, but I'm unaware
of any other way to get equivalent functionality.
`
On Tue, 2007-09-18 at 19:54 -0500, Steve Borho wrote:
> # HG changeset patch
> # User Steve Borho <steve at borho.org>
> # Date 1190163181 18000
> # Node ID 98203cff47ce85df26094d03eda8c79ab858f2e2
> # Parent  ba3dc78839686ccb285f4227a80356f7b13e6f8f
> Allow explicit disabling of extensions
> 
> If the first character of an extension path is '!', the extension
> is silently skipped.
> 
> diff --git a/mercurial/extensions.py b/mercurial/extensions.py
> --- a/mercurial/extensions.py
> +++ b/mercurial/extensions.py
> @@ -70,6 +70,8 @@ def loadall(ui):
>      result = ui.configitems("extensions")
>      for i, (name, path) in enumerate(result):
>          if path:
> +            if path[0] == '!':
> +                continue
>              path = os.path.expanduser(path)
>          try:
>              load(ui, name, path)

Cheers.

-- 
Steve Borho (steve at borho.org)
http://www.borho.org/~steve/steve.asc
Key fingerprint = 2D08 E7CF B624 624C DE1F  E2E4 B0C2 5292 F2C6 2C8C



More information about the Mercurial-devel mailing list