hgext/phabricator.py
changeset 44421 b715432fabba
parent 44420 ddcb51390891
child 44422 d5d262c7e7a2
equal deleted inserted replaced
44420:ddcb51390891 44421:b715432fabba
  1684         (b'', b'reclaim', False, _(b'reclaim revisions')),
  1684         (b'', b'reclaim', False, _(b'reclaim revisions')),
  1685         (b'm', b'comment', b'', _(b'comment on the last revision')),
  1685         (b'm', b'comment', b'', _(b'comment on the last revision')),
  1686     ],
  1686     ],
  1687     _(b'DREVSPEC [OPTIONS]'),
  1687     _(b'DREVSPEC [OPTIONS]'),
  1688     helpcategory=command.CATEGORY_IMPORT_EXPORT,
  1688     helpcategory=command.CATEGORY_IMPORT_EXPORT,
       
  1689     optionalrepo=True,
  1689 )
  1690 )
  1690 def phabupdate(ui, repo, spec, **opts):
  1691 def phabupdate(ui, repo, spec, **opts):
  1691     """update Differential Revision in batch
  1692     """update Differential Revision in batch
  1692 
  1693 
  1693     DREVSPEC selects revisions. See :hg:`help phabread` for its usage.
  1694     DREVSPEC selects revisions. See :hg:`help phabread` for its usage.
  1699 
  1700 
  1700     actions = []
  1701     actions = []
  1701     for f in flags:
  1702     for f in flags:
  1702         actions.append({b'type': f, b'value': True})
  1703         actions.append({b'type': f, b'value': True})
  1703 
  1704 
  1704     drevs = querydrev(repo.ui, spec)
  1705     drevs = querydrev(ui, spec)
  1705     for i, drev in enumerate(drevs):
  1706     for i, drev in enumerate(drevs):
  1706         if i + 1 == len(drevs) and opts.get(b'comment'):
  1707         if i + 1 == len(drevs) and opts.get(b'comment'):
  1707             actions.append({b'type': b'comment', b'value': opts[b'comment']})
  1708             actions.append({b'type': b'comment', b'value': opts[b'comment']})
  1708         if actions:
  1709         if actions:
  1709             params = {
  1710             params = {