D8214: phabricator: make `hg phabread` work outside of a repository
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Wed Mar 4 15:27:23 UTC 2020
mharbison72 created this revision.
Herald added subscribers: mercurial-devel, Kwan.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
This is similar to 16312ea45a8b <https://phab.mercurial-scm.org/rHG16312ea45a8b766b20961d943181a52236386579> and 2513f0f70a26 <https://phab.mercurial-scm.org/rHG2513f0f70a26b402f06c56909563bd09e328d639>- we don't need a repo, but will
load .hg/hgrc if inside one.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D8214
AFFECTED FILES
hgext/phabricator.py
CHANGE DETAILS
diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -1655,6 +1655,7 @@
[(b'', b'stack', False, _(b'read dependencies'))],
_(b'DREVSPEC [OPTIONS]'),
helpcategory=command.CATEGORY_IMPORT_EXPORT,
+ optionalrepo=True,
)
def phabread(ui, repo, spec, **opts):
"""print patches from Phabricator suitable for importing
@@ -1678,13 +1679,13 @@
opts = pycompat.byteskwargs(opts)
if opts.get(b'stack'):
spec = b':(%s)' % spec
- drevs = querydrev(repo.ui, spec)
+ drevs = querydrev(ui, spec)
def _write(patches):
for drev, content in patches:
ui.write(content)
- readpatch(repo.ui, drevs, _write)
+ readpatch(ui, drevs, _write)
@vcrcommand(
To: mharbison72, #hg-reviewers
Cc: Kwan, mercurial-devel
More information about the Mercurial-devel
mailing list