show: make template option actually show up in help
authorRyan McElroy <rmcelroy@fb.com>
Thu, 13 Apr 2017 03:17:53 -0700
changeset 31945 02c3b1f396de
parent 31944 99bc93147d87
child 31946 f3b80537a70d
show: make template option actually show up in help Previously, the --template/-T option didn't show up in help because it's marked as experimental. It's not really experimental for show, and its quite important for show's funcationality, so let's make sure it always shows up.
hgext/show.py
tests/test-show.t
--- a/hgext/show.py	Wed Apr 12 20:31:15 2017 -0700
+++ b/hgext/show.py	Thu Apr 13 03:17:53 2017 -0700
@@ -18,7 +18,6 @@
 from mercurial.node import nullrev
 from mercurial import (
     cmdutil,
-    commands,
     error,
     formatter,
     graphmod,
@@ -58,7 +57,14 @@
 
 showview = showcmdfunc()
 
-@command('show', commands.formatteropts, _('VIEW'))
+@command('show', [
+    # TODO: Switch this template flag to use commands.formatteropts if
+    # 'hg show' becomes stable before --template/-T is stable. For now,
+    # we are putting it here without the '(EXPERIMENTAL)' flag because it
+    # is an important part of the 'hg show' user experience and the entire
+    # 'hg show' experience is experimental.
+    ('T', 'template', '', ('display with template'), _('TEMPLATE')),
+    ], _('VIEW'))
 def show(ui, repo, view=None, template=None):
     """show various repository information
 
--- a/tests/test-show.t	Wed Apr 12 20:31:15 2017 -0700
+++ b/tests/test-show.t	Thu Apr 13 03:17:53 2017 -0700
@@ -46,6 +46,8 @@
   
   options:
   
+   -T --template TEMPLATE display with template
+  
   (some details hidden, use --verbose to show complete help)
 
 Unknown view prints error