changeset 41073:536beb130f3c

phabricator: assign commands to help categories `phabsend` and `phabupdate` seem pretty close to `email`. `phabread` is a little less close, but can be trivially used to actually import patches.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 28 Dec 2018 17:33:13 -0500
parents 72d4a1761fbc
children 9afe128f7727
files hgext/phabricator.py
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/phabricator.py	Fri Dec 28 00:53:58 2018 -0500
+++ b/hgext/phabricator.py	Fri Dec 28 17:33:13 2018 -0500
@@ -121,7 +121,7 @@
      )),
 ]
 
-def vcrcommand(name, flags, spec):
+def vcrcommand(name, flags, spec, helpcategory=None):
     fullflags = flags + _VCR_FLAGS
     def decorate(fn):
         def inner(*args, **kwargs):
@@ -143,7 +143,7 @@
             return fn(*args, **kwargs)
         inner.__name__ = fn.__name__
         inner.__doc__ = fn.__doc__
-        return command(name, fullflags, spec)(inner)
+        return command(name, fullflags, spec, helpcategory=helpcategory)(inner)
     return decorate
 
 def urlencodenested(params):
@@ -463,7 +463,8 @@
           (b'', b'amend', True, _(b'update commit messages')),
           (b'', b'reviewer', [], _(b'specify reviewers')),
           (b'', b'confirm', None, _(b'ask for confirmation before sending'))],
-         _(b'REV [OPTIONS]'))
+         _(b'REV [OPTIONS]'),
+         helpcategory=command.CATEGORY_IMPORT_EXPORT)
 def phabsend(ui, repo, *revs, **opts):
     """upload changesets to Phabricator
 
@@ -917,7 +918,8 @@
 
 @vcrcommand(b'phabread',
          [(b'', b'stack', False, _(b'read dependencies'))],
-         _(b'DREVSPEC [OPTIONS]'))
+         _(b'DREVSPEC [OPTIONS]'),
+         helpcategory=command.CATEGORY_IMPORT_EXPORT)
 def phabread(ui, repo, spec, **opts):
     """print patches from Phabricator suitable for importing
 
@@ -948,7 +950,8 @@
           (b'', b'abandon', False, _(b'abandon revisions')),
           (b'', b'reclaim', False, _(b'reclaim revisions')),
           (b'm', b'comment', b'', _(b'comment on the last revision')),
-          ], _(b'DREVSPEC [OPTIONS]'))
+          ], _(b'DREVSPEC [OPTIONS]'),
+          helpcategory=command.CATEGORY_IMPORT_EXPORT)
 def phabupdate(ui, repo, spec, **opts):
     """update Differential Revision in batch