[PATCH] Cache extension load failures

Brendan Cully brendan at kublai.com
Wed Aug 8 20:04:30 CDT 2007


# HG changeset patch
# User Brendan Cully <brendan at kublai.com>
# Date 1186621446 25200
# Node ID 6c6215f727adbce26fb474f4dfe87e86d21808ce
# Parent  7106f4899aa01a8f9da8fb1e9cd48177c03a37d0
Cache extension load failures.
hg commands call extensions.loadall twice, once during dispatch and
once when the repository is instantiated. Without this change, load
caches successful loads, but not unsuccessful, causing errors to be
displayed twice.

diff -r 7106f4899aa0 -r 6c6215f727ad mercurial/extensions.py
--- a/mercurial/extensions.py	Tue Aug 07 15:57:23 2007 +0200
+++ b/mercurial/extensions.py	Wed Aug 08 18:04:06 2007 -0700
@@ -30,6 +30,7 @@ def load(ui, name, path):
         shortname = name
     if shortname in _extensions:
         return
+    _extensions[shortname] = None
     if path:
         # the module will be loaded in sys.modules
         # choose an unique name so that it doesn't


More information about the Mercurial-devel mailing list