[PATCH] Allow explicit disabling of extensions

Steve Borho steve at borho.org
Tue Sep 18 19:54:55 CDT 2007


# 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)


More information about the Mercurial-devel mailing list