extensions: fix a debug message when searching for extensions
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Fri, 30 Sep 2016 00:25:15 +0200
changeset 30029 ebe488e04ca3
parent 30028 ba06562a06a2
child 30030 3741a8f86e88
extensions: fix a debug message when searching for extensions The "next" value was wrong. When 'hgext.NAME' is not found we now search for 'hgext3rd.NAME'.
mercurial/extensions.py
tests/test-bad-extension.t
--- a/mercurial/extensions.py	Tue Aug 30 15:16:28 2016 -0700
+++ b/mercurial/extensions.py	Fri Sep 30 00:25:15 2016 +0200
@@ -105,7 +105,7 @@
         try:
             mod = _importh("hgext.%s" % name)
         except ImportError as err:
-            _reportimporterror(ui, err, "hgext.%s" % name, name)
+            _reportimporterror(ui, err, "hgext.%s" % name, "hgext3rd.%s" % name)
             try:
                 mod = _importh("hgext3rd.%s" % name)
             except ImportError as err:
--- a/tests/test-bad-extension.t	Tue Aug 30 15:16:28 2016 -0700
+++ b/tests/test-bad-extension.t	Fri Sep 30 00:25:15 2016 +0200
@@ -53,7 +53,7 @@
   *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow
   Traceback (most recent call last):
   Exception: bit bucket overflow
-  could not import hgext.badext2 (No module named *badext2): trying badext2 (glob)
+  could not import hgext.badext2 (No module named *badext2): trying hgext3rd.badext2 (glob)
   Traceback (most recent call last):
   ImportError: No module named *badext2 (glob)
   could not import hgext3rd.badext2 (No module named *badext2): trying badext2 (glob)