diff mercurial/help.py @ 31097:6918c9215201

help: hide command line options marked as "advanced" Previously, we have keywords like "(DEPRECATED)" and "(EXPERIMENTAL)" to hide command line options in non-verbose help output. However, sometimes an option is neither deprecated nor experimental. It's well-tested and working, but just not designed to average users. This patch adds a keyword "(ADVANCED)" to fit in such use cases. Thanks rom1dep for the suggestion of the word "advanced".
author Jun Wu <quark@fb.com>
date Tue, 01 Nov 2016 14:50:45 +0000
parents 900996da577a
children 71f692f1f678
line wrap: on
line diff
--- a/mercurial/help.py	Thu Feb 23 21:27:25 2017 +0900
+++ b/mercurial/help.py	Tue Nov 01 14:50:45 2016 +0000
@@ -33,14 +33,17 @@
     webcommands,
 )
 
-_exclkeywords = [
+_exclkeywords = set([
+    "(ADVANCED)",
     "(DEPRECATED)",
     "(EXPERIMENTAL)",
+    # i18n: "(ADVANCED)" is a keyword, must be translated consistently
+    _("(ADVANCED)"),
     # i18n: "(DEPRECATED)" is a keyword, must be translated consistently
     _("(DEPRECATED)"),
     # i18n: "(EXPERIMENTAL)" is a keyword, must be translated consistently
     _("(EXPERIMENTAL)"),
-    ]
+    ])
 
 def listexts(header, exts, indent=1, showdeprecated=False):
     '''return a text listing of the given extensions'''