changeset 29701:47e48931263e

debugextensions: give short name to util.version()
author Yuya Nishihara <yuya@tcha.org>
date Sun, 10 Jul 2016 22:06:13 +0900
parents 6eb9c8291a78
children d29fbf97cc9f
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sun Jul 10 21:59:43 2016 +0900
+++ b/mercurial/commands.py	Sun Jul 10 22:06:13 2016 +0900
@@ -2398,6 +2398,7 @@
 def debugextensions(ui, **opts):
     '''show information about active extensions'''
     exts = extensions.extensions(ui)
+    hgver = util.version()
     fm = ui.formatter('debugextensions', opts)
     for extname, extmod in sorted(exts, key=operator.itemgetter(0)):
         extsource = extmod.__file__
@@ -2413,8 +2414,7 @@
             if not exttestedwith:
                 fm.plain(_(' (untested!)\n'))
             else:
-                if exttestedwith == ['internal'] or \
-                                util.version() in exttestedwith:
+                if exttestedwith == ['internal'] or hgver in exttestedwith:
                     fm.plain('\n')
                 else:
                     lasttestedversion = exttestedwith[-1]