Mercurial > public > mercurial-scm > hg-stable
comparison hgext/phabricator.py @ 44593:2d63a8910db6
phabricator: remove *-argument from _getdrevs()
It can't take more than one specs arguments per len(*specs).
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 21 Mar 2020 14:01:10 +0900 |
parents | a7f8c657a3f0 |
children | 7b9aaec17126 |
comparison
equal
deleted
inserted
replaced
44592:f913ece27ff5 | 44593:2d63a8910db6 |
---|---|
1630 if b'parent' not in meta and diff.get(b'sourceControlBaseRevision'): | 1630 if b'parent' not in meta and diff.get(b'sourceControlBaseRevision'): |
1631 meta[b'parent'] = diff[b'sourceControlBaseRevision'] | 1631 meta[b'parent'] = diff[b'sourceControlBaseRevision'] |
1632 return meta | 1632 return meta |
1633 | 1633 |
1634 | 1634 |
1635 def _getdrevs(ui, stack, *specs): | 1635 def _getdrevs(ui, stack, specs): |
1636 """convert user supplied DREVSPECs into "Differential Revision" dicts | 1636 """convert user supplied DREVSPECs into "Differential Revision" dicts |
1637 | 1637 |
1638 See ``hg help phabread`` for how to specify each DREVSPEC. | 1638 See ``hg help phabread`` for how to specify each DREVSPEC. |
1639 """ | 1639 """ |
1640 if len(*specs) > 0: | 1640 if len(specs) > 0: |
1641 | 1641 |
1642 def _formatspec(s): | 1642 def _formatspec(s): |
1643 if stack: | 1643 if stack: |
1644 s = b':(%s)' % s | 1644 s = b':(%s)' % s |
1645 return b'(%s)' % s | 1645 return b'(%s)' % s |
1646 | 1646 |
1647 spec = b'+'.join(pycompat.maplist(_formatspec, *specs)) | 1647 spec = b'+'.join(pycompat.maplist(_formatspec, specs)) |
1648 | 1648 |
1649 drevs = querydrev(ui, spec) | 1649 drevs = querydrev(ui, spec) |
1650 if drevs: | 1650 if drevs: |
1651 return drevs | 1651 return drevs |
1652 | 1652 |