Re: [PATCH] commands: adjust metavariables as appropriate

2018-10-18 Thread Yuya Nishihara
On Wed, 17 Oct 2018 22:23:01 +0800, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov 
> # Date 1539781236 -28800
> #  Wed Oct 17 21:00:36 2018 +0800
> # Node ID 02ad74c4abc1b66e63f118f1247ccc7c97acc786
> # Parent  ef0baff11aeaaa8424294982235a18c476728264
> commands: adjust metavariables as appropriate

Nice. Queued, thanks.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH] commands: adjust metavariables as appropriate

2018-10-17 Thread Anton Shestakov
# HG changeset patch
# User Anton Shestakov 
# Date 1539781236 -28800
#  Wed Oct 17 21:00:36 2018 +0800
# Node ID 02ad74c4abc1b66e63f118f1247ccc7c97acc786
# Parent  ef0baff11aeaaa8424294982235a18c476728264
commands: adjust metavariables as appropriate

Apart from looking better in hg help command, these strings are also helpful
when generating shell completions programmatically.

diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -478,20 +478,25 @@ emailopts = [
 ('', 'body', None, _('send patches as inline message text (default)')),
 ('a', 'attach', None, _('send patches as attachments')),
 ('i', 'inline', None, _('send patches as inline attachments')),
-('', 'bcc', [], _('email addresses of blind carbon copy recipients')),
-('c', 'cc', [], _('email addresses of copy recipients')),
+('', 'bcc', [],
+ _('email addresses of blind carbon copy recipients'), _('EMAIL')),
+('c', 'cc', [], _('email addresses of copy recipients'), _('EMAIL')),
 ('', 'confirm', None, _('ask for confirmation before sending')),
 ('d', 'diffstat', None, _('add diffstat output to messages')),
-('', 'date', '', _('use the given date as the sending date')),
-('', 'desc', '', _('use the given file as the series description')),
-('f', 'from', '', _('email address of sender')),
+('', 'date', '', _('use the given date as the sending date'), _('DATE')),
+('', 'desc', '',
+ _('use the given file as the series description'), _('FILE')),
+('f', 'from', '', _('email address of sender'), _('EMAIL')),
 ('n', 'test', None, _('print messages that would be sent')),
-('m', 'mbox', '', _('write messages to mbox file instead of sending 
them')),
-('', 'reply-to', [], _('email addresses replies should be sent to')),
-('s', 'subject', '', _('subject of first message (intro or single 
patch)')),
-('', 'in-reply-to', '', _('message identifier to reply to')),
-('', 'flag', [], _('flags to add in subject prefixes')),
-('t', 'to', [], _('email addresses of recipients'))]
+('m', 'mbox', '',
+ _('write messages to mbox file instead of sending them'), _('FILE')),
+('', 'reply-to', [],
+ _('email addresses replies should be sent to'), _('EMAIL')),
+('s', 'subject', '',
+ _('subject of first message (intro or single patch)'), _('TEXT')),
+('', 'in-reply-to', '', _('message identifier to reply to'), _('MSGID')),
+('', 'flag', [], _('flags to add in subject prefixes'), _('FLAG')),
+('t', 'to', [], _('email addresses of recipients'), _('EMAIL'))]
 
 @command('email',
 [('g', 'git', None, _('use git extended diff format')),
@@ -499,7 +504,8 @@ emailopts = [
 ('o', 'outgoing', None,
  _('send changes not found in the target repository')),
 ('b', 'bundle', None, _('send changes not in target as a binary bundle')),
-('B', 'bookmark', '', _('send changes only reachable by given bookmark')),
+('B', 'bookmark', '',
+ _('send changes only reachable by given bookmark'), _('BOOKMARK')),
 ('', 'bundlename', 'bundle',
  _('name of the bundle attachment file'), _('NAME')),
 ('r', 'rev', [], _('a revision to send'), _('REV')),
diff --git a/hgext/strip.py b/hgext/strip.py
--- a/hgext/strip.py
+++ b/hgext/strip.py
@@ -110,7 +110,7 @@ def strip(ui, repo, revs, update=True, b
   ('k', 'keep', None, _("do not modify working directory during "
 "strip")),
   ('B', 'bookmark', [], _("remove revs only reachable from given"
-  " bookmark"))],
+  " bookmark"), _('BOOKMARK'))],
   _('hg strip [-k] [-f] [-B bookmark] [-r] REV...'),
   helpcategory=command.CATEGORY_MAINTENANCE)
 def stripcmd(ui, repo, *revs, **opts):
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -149,7 +149,7 @@ diffopts2 = [
 ]
 
 mergetoolopts = [
-('t', 'tool', '', _('specify merge tool')),
+('t', 'tool', '', _('specify merge tool'), _('TOOL')),
 ]
 
 similarityopts = [
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1996,7 +1996,7 @@ def diff(ui, repo, *pats, **opts):
 
 @command('export',
 [('B', 'bookmark', '',
- _('export changes only reachable by given bookmark')),
+ _('export changes only reachable by given bookmark'), _('BOOKMARK')),
 ('o', 'output', '',
  _('print output to file with formatted name'), _('FORMAT')),
 ('', 'switch-parent', None, _('diff against the second parent')),
@@ -2257,7 +2257,7 @@ def forget(ui, repo, *pats, **opts):
  ('D', 'currentdate', False,
   _('record the current date as commit date')),
  ('U', 'currentuser', False,
-  _('record the current user as committer'), _('DATE'))]
+  _('record the current user as committer'))]
 + commitopts2 +