Patchwork [2,of,3] help: list deprecated and experimental extensions if --verbose

login
register
mail settings
Submitter Yuya Nishihara
Date Feb. 15, 2018, 1:42 p.m.
Message ID <d5c440f7e2840eae1902.1518702157@mimosa>
Download mbox | patch
Permalink /patch/27975/
State Accepted
Headers show

Comments

Yuya Nishihara - Feb. 15, 2018, 1:42 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1451193207 -32400
#      Sun Dec 27 14:13:27 2015 +0900
# Node ID d5c440f7e2840eae190246159ec31d74b4df655f
# Parent  946e9e3e4453780ef4ea9120f3f3dd1acbf5ad44
help: list deprecated and experimental extensions if --verbose

This is common in the other help topics.

Patch

diff --git a/mercurial/help.py b/mercurial/help.py
--- a/mercurial/help.py
+++ b/mercurial/help.py
@@ -62,7 +62,8 @@  def extshelp(ui):
     rst = loaddoc('extensions')(ui).splitlines(True)
     rst.extend(listexts(
         _('enabled extensions:'), extensions.enabled(), showdeprecated=True))
-    rst.extend(listexts(_('disabled extensions:'), extensions.disabled()))
+    rst.extend(listexts(_('disabled extensions:'), extensions.disabled(),
+                        showdeprecated=ui.verbose))
     doc = ''.join(rst)
     return doc
 
diff --git a/tests/test-help.t b/tests/test-help.t
--- a/tests/test-help.t
+++ b/tests/test-help.t
@@ -283,6 +283,11 @@  Test extension help:
        win32mbcs     allow the use of MBCS paths with problematic encodings
        zeroconf      discover and advertise repositories on the local network
 
+Verify that deprecated extensions are included if --verbose:
+
+  $ hg -v help extensions | grep children
+       children      command to display child changesets (DEPRECATED)
+
 Verify that extension keywords appear in help templates
 
   $ hg help --config extensions.transplant= templating|grep transplant > /dev/null