diff mercurial/commands.py @ 22429:7a7eed5176a4

commands: add hidden -T option for files/manifest/status/tags These commands have generic formatting support but no way to enable it yet. When this feature is more fully developed, this flag will be unhidden.
author Matt Mackall <mpm@selenic.com>
date Mon, 15 Sep 2014 13:15:07 -0500
parents edf07a804ac4
children eaeee6f95fc0
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Sep 12 18:29:29 2014 -0500
+++ b/mercurial/commands.py	Mon Sep 15 13:15:07 2014 -0500
@@ -101,6 +101,12 @@
      _('record the specified user as committer'), _('USER')),
 ]
 
+# hidden for now
+formatteropts = [
+    ('T', 'template', '',
+     _('display with template (DEPRECATED)'), _('TEMPLATE')),
+]
+
 templateopts = [
     ('', 'style', '',
      _('display using template map file (DEPRECATED)'), _('STYLE')),
@@ -3064,7 +3070,7 @@
 @command('files',
     [('r', 'rev', '', _('search the repository as it is in REV'), _('REV')),
      ('0', 'print0', None, _('end filenames with NUL, for use with xargs')),
-    ] + walkopts,
+    ] + walkopts + formatteropts,
     _('[OPTION]... [PATTERN]...'))
 def files(ui, repo, *pats, **opts):
     """list tracked files
@@ -4343,7 +4349,8 @@
 
 @command('manifest',
     [('r', 'rev', '', _('revision to display'), _('REV')),
-     ('', 'all', False, _("list files from all revisions"))],
+     ('', 'all', False, _("list files from all revisions"))]
+         + formatteropts,
     _('[-r REV]'))
 def manifest(ui, repo, node=None, rev=None, **opts):
     """output the current or given revision of the project manifest
@@ -5502,7 +5509,7 @@
     ('0', 'print0', None, _('end filenames with NUL, for use with xargs')),
     ('', 'rev', [], _('show difference from revision'), _('REV')),
     ('', 'change', '', _('list the changed files of a revision'), _('REV')),
-    ] + walkopts + subrepoopts,
+    ] + walkopts + subrepoopts + formatteropts,
     _('[OPTION]... [FILE]...'),
     inferrepo=True)
 def status(ui, repo, *pats, **opts):
@@ -5957,7 +5964,7 @@
     finally:
         release(lock, wlock)
 
-@command('tags', [], '')
+@command('tags', formatteropts, '')
 def tags(ui, repo, **opts):
     """list repository tags