Show More
@@ -1632,6 +1632,27 b' def getdiffmeta(diff):' | |||||
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 |
General Comments 0
You need to be logged in to leave comments.
Login now