##// END OF EJS Templates
phabricator: make `hg phabread` work outside of a repository...
Matt Harbison -
r44910:5e2d74e5 default
parent child Browse files
Show More
@@ -1655,6 +1655,7 b' def readpatch(ui, drevs, write):'
1655 [(b'', b'stack', False, _(b'read dependencies'))],
1655 [(b'', b'stack', False, _(b'read dependencies'))],
1656 _(b'DREVSPEC [OPTIONS]'),
1656 _(b'DREVSPEC [OPTIONS]'),
1657 helpcategory=command.CATEGORY_IMPORT_EXPORT,
1657 helpcategory=command.CATEGORY_IMPORT_EXPORT,
1658 optionalrepo=True,
1658 )
1659 )
1659 def phabread(ui, repo, spec, **opts):
1660 def phabread(ui, repo, spec, **opts):
1660 """print patches from Phabricator suitable for importing
1661 """print patches from Phabricator suitable for importing
@@ -1678,13 +1679,13 b' def phabread(ui, repo, spec, **opts):'
1678 opts = pycompat.byteskwargs(opts)
1679 opts = pycompat.byteskwargs(opts)
1679 if opts.get(b'stack'):
1680 if opts.get(b'stack'):
1680 spec = b':(%s)' % spec
1681 spec = b':(%s)' % spec
1681 drevs = querydrev(repo.ui, spec)
1682 drevs = querydrev(ui, spec)
1682
1683
1683 def _write(patches):
1684 def _write(patches):
1684 for drev, content in patches:
1685 for drev, content in patches:
1685 ui.write(content)
1686 ui.write(content)
1686
1687
1687 readpatch(repo.ui, drevs, _write)
1688 readpatch(ui, drevs, _write)
1688
1689
1689
1690
1690 @vcrcommand(
1691 @vcrcommand(
General Comments 0
You need to be logged in to leave comments. Login now