debugextensions: give short name to util.version()
authorYuya Nishihara <yuya@tcha.org>
Sun, 10 Jul 2016 22:06:13 +0900
changeset 29701 47e48931263e
parent 29700 6eb9c8291a78
child 29702 d29fbf97cc9f
debugextensions: give short name to util.version()
mercurial/commands.py
--- 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]