contrib/phabricator.py
changeset 33975 07ffff841863
parent 33974 45a8cd74de4e
child 33976 27ff2a87d8c0
equal deleted inserted replaced
33974:45a8cd74de4e 33975:07ffff841863
     5 # This software may be used and distributed according to the terms of the
     5 # This software may be used and distributed according to the terms of the
     6 # GNU General Public License version 2 or any later version.
     6 # GNU General Public License version 2 or any later version.
     7 """simple Phabricator integration
     7 """simple Phabricator integration
     8 
     8 
     9 This extension provides a ``phabsend`` command which sends a stack of
     9 This extension provides a ``phabsend`` command which sends a stack of
    10 changesets to Phabricator without amending commit messages, and a ``phabread``
    10 changesets to Phabricator, and a ``phabread`` command which prints a stack of
    11 command which prints a stack of revisions in a format suitable
    11 revisions in a format suitable for :hg:`import`, and a ``phabupdate`` command
    12 for :hg:`import`, and a ``phabupdate`` command to update statuses in batch.
    12 to update statuses in batch.
    13 
    13 
    14 By default, Phabricator requires ``Test Plan`` which might prevent some
    14 By default, Phabricator requires ``Test Plan`` which might prevent some
    15 changeset from being sent. The requirement could be disabled by changing
    15 changeset from being sent. The requirement could be disabled by changing
    16 ``differential.require-test-plan-field`` config server side.
    16 ``differential.require-test-plan-field`` config server side.
    17 
    17 
   337                           % ' '.join(sorted(unresolved)))
   337                           % ' '.join(sorted(unresolved)))
   338     return [entry[r'phid'] for entry in data]
   338     return [entry[r'phid'] for entry in data]
   339 
   339 
   340 @command('phabsend',
   340 @command('phabsend',
   341          [('r', 'rev', [], _('revisions to send'), _('REV')),
   341          [('r', 'rev', [], _('revisions to send'), _('REV')),
   342           ('', 'amend', False, _('update commit messages')),
   342           ('', 'amend', True, _('update commit messages')),
   343           ('', 'reviewer', [], _('specify reviewers')),
   343           ('', 'reviewer', [], _('specify reviewers')),
   344           ('', 'confirm', None, _('ask for confirmation before sending'))],
   344           ('', 'confirm', None, _('ask for confirmation before sending'))],
   345          _('REV [OPTIONS]'))
   345          _('REV [OPTIONS]'))
   346 def phabsend(ui, repo, *revs, **opts):
   346 def phabsend(ui, repo, *revs, **opts):
   347     """upload changesets to Phabricator
   347     """upload changesets to Phabricator