# HG changeset patch # User Matt Harbison # Date 2020-02-17 18:14:44 # Node ID b715432fabbae3cf09583ed82186d20f868f43fe # Parent ddcb5139089151b4b2133a5ef87452d89ae90942 phabricator: make `hg phabupdate` work outside of a repository This is similar to 16312ea45a8b- we don't need a repo, but will load .hg/hgrc if inside one. Differential Revision: https://phab.mercurial-scm.org/D8208 diff --git a/hgext/phabricator.py b/hgext/phabricator.py --- a/hgext/phabricator.py +++ b/hgext/phabricator.py @@ -1686,6 +1686,7 @@ def phabread(ui, repo, spec, **opts): ], _(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 @@ def phabupdate(ui, repo, spec, **opts): 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']})