equal
deleted
inserted
replaced
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): |
|
1636 """convert user supplied DREVSPECs into "Differential Revision" dicts |
|
1637 |
|
1638 See ``hg help phabread`` for how to specify each DREVSPEC. |
|
1639 """ |
|
1640 if len(*specs) > 0: |
|
1641 |
|
1642 def _formatspec(s): |
|
1643 if stack: |
|
1644 s = b':(%s)' % s |
|
1645 return b'(%s)' % s |
|
1646 |
|
1647 spec = b'+'.join(pycompat.maplist(_formatspec, *specs)) |
|
1648 |
|
1649 drevs = querydrev(ui, spec) |
|
1650 if drevs: |
|
1651 return drevs |
|
1652 |
|
1653 raise error.Abort(_(b"empty DREVSPEC set")) |
|
1654 |
|
1655 |
1635 def readpatch(ui, drevs, write): |
1656 def readpatch(ui, drevs, write): |
1636 """generate plain-text patch readable by 'hg import' |
1657 """generate plain-text patch readable by 'hg import' |
1637 |
1658 |
1638 write takes a list of (DREV, bytes), where DREV is the differential number |
1659 write takes a list of (DREV, bytes), where DREV is the differential number |
1639 (as bytes, without the "D" prefix) and the bytes are the text of a patch |
1660 (as bytes, without the "D" prefix) and the bytes are the text of a patch |