mercurial/extensions.py
changeset 38727 fcb517ff9562
parent 38344 c6f82a18a63d
child 38798 d58958676b3c
--- a/mercurial/extensions.py	Mon Jul 16 11:38:56 2018 -0700
+++ b/mercurial/extensions.py	Mon Jul 16 18:02:30 2018 +0200
@@ -123,10 +123,11 @@
 def _reportimporterror(ui, err, failed, next):
     # note: this ui.debug happens before --debug is processed,
     #       Use --config ui.debug=1 to see them.
-    ui.debug('could not import %s (%s): trying %s\n'
-             % (failed, stringutil.forcebytestr(err), next))
-    if ui.debugflag:
-        ui.traceback()
+    if ui.configbool('devel', 'debug.extensions'):
+        ui.debug('could not import %s (%s): trying %s\n'
+                 % (failed, stringutil.forcebytestr(err), next))
+        if ui.debugflag:
+            ui.traceback()
 
 def _rejectunicode(name, xs):
     if isinstance(xs, (list, set, tuple)):