diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -7255,21 +7255,21 @@ def version_(ui): )) ui.note(_("\nEnabled extensions:\n\n")) - if ui.verbose: - # format names and versions into columns - names = [] - vers = [] - place = [] - for name, module in extensions.extensions(): - names.append(name) - vers.append(extensions.moduleversion(module)) - if extensions.ismoduleinternal(module): - place.append(_("internal")) - else: - place.append(_("external")) - if names: - maxnamelen = max(len(n) for n in names) - for i, name in enumerate(names): + # format names and versions into columns + names = [] + vers = [] + place = [] + for name, module in extensions.extensions(): + names.append(name) + vers.append(extensions.moduleversion(module)) + if extensions.ismoduleinternal(module): + place.append(_("internal")) + else: + place.append(_("external")) + if names: + maxnamelen = max(len(n) for n in names) + for i, name in enumerate(names): + if ui.verbose: ui.write(" %-*s %s %s\n" % (maxnamelen, name, place[i], vers[i])) diff --git a/tests/test-extension.t b/tests/test-extension.t --- a/tests/test-extension.t +++ b/tests/test-extension.t @@ -1236,6 +1236,9 @@ Test version number support in 'hg versi throw external 1.twentythree + $ hg version -q --config extensions.throw=throw.py + Mercurial Distributed SCM (version *) (glob) + Refuse to load extensions with minimum version requirements $ cat > minversion1.py << EOF