[PATCH 2 of 4] debugextensions: give short name to util.version()

Yuya Nishihara yuya at tcha.org
Thu Aug 4 16:13:18 UTC 2016


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1468155973 -32400
#      Sun Jul 10 22:06:13 2016 +0900
# Node ID fb0ca5876b523dc93d5cb9990a5b22a846b43cc8
# Parent  68800e79b8d859871ab65c731ce127b7026dfac4
debugextensions: give short name to util.version()

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2398,6 +2398,7 @@ def debugdiscovery(ui, repo, remoteurl="
 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 @@ def debugextensions(ui, **opts):
             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]



More information about the Mercurial-devel mailing list