Patchwork D8208: phabricator: make `hg phabupdate` work outside of a repository

login
register
mail settings
Submitter phabricator
Date March 3, 2020, 6:25 p.m.
Message ID <differential-rev-PHID-DREV-qzjjmv7y5kkizubk7so2-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/45429/
State Superseded
Headers show

Comments

phabricator - March 3, 2020, 6:25 p.m.
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>- 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/D8208

AFFECTED FILES
  hgext/phabricator.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -1686,6 +1686,7 @@ 
     ],
     _(b'DREVSPEC [OPTIONS]'),
     helpcategory=command.CATEGORY_IMPORT_EXPORT,
+    optionalrepo=True,
 )
 def phabupdate(ui, repo, spec, **opts):
     """update Differential Revision in batch
@@ -1701,7 +1702,7 @@ 
     for f in flags:
         actions.append({b'type': f, b'value': True})
 
-    drevs = querydrev(repo.ui, spec)
+    drevs = querydrev(ui, spec)
     for i, drev in enumerate(drevs):
         if i + 1 == len(drevs) and opts.get(b'comment'):
             actions.append({b'type': b'comment', b'value': opts[b'comment']})