Patchwork D8214: phabricator: make `hg phabread` work outside of a repository

login
register
mail settings
Submitter phabricator
Date March 4, 2020, 6:45 p.m.
Message ID <a04cb70679a709c3ef52f6f78cb789fd@localhost.localdomain>
Download mbox | patch
Permalink /patch/45475/
State Not Applicable
Headers show

Comments

phabricator - March 4, 2020, 6:45 p.m.
Closed by commit rHGa161a993f253: phabricator: make `hg phabread` work outside of a repository (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8214?vs=20457&id=20470

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8214/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8214

AFFECTED FILES
  hgext/phabricator.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers, pulkit
Cc: Kwan, mercurial-devel

Patch

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(