Patchwork D6499: phabricator: make `hg debugcallconduit` work outside a hg repo

login
register
mail settings
Submitter phabricator
Date June 10, 2019, 1:19 p.m.
Message ID <3b7b24b15b1320b5bbfd6373f21ddee9@localhost.localdomain>
Download mbox | patch
Permalink /patch/40394/
State Not Applicable
Headers show

Comments

phabricator - June 10, 2019, 1:19 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG16312ea45a8b: phabricator: make `hg debugcallconduit` work outside a hg repo (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6499?vs=15410&id=15411

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

AFFECTED FILES
  hgext/phabricator.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -125,7 +125,7 @@ 
      )),
 ]
 
-def vcrcommand(name, flags, spec, helpcategory=None):
+def vcrcommand(name, flags, spec, helpcategory=None, optionalrepo=False):
     fullflags = flags + _VCR_FLAGS
     def hgmatcher(r1, r2):
         if r1.uri != r2.uri or r1.method != r2.method:
@@ -156,7 +156,8 @@ 
             return fn(*args, **kwargs)
         inner.__name__ = fn.__name__
         inner.__doc__ = fn.__doc__
-        return command(name, fullflags, spec, helpcategory=helpcategory)(inner)
+        return command(name, fullflags, spec, helpcategory=helpcategory,
+                       optionalrepo=optionalrepo)(inner)
     return decorate
 
 def urlencodenested(params):
@@ -242,7 +243,7 @@ 
         raise error.Abort(msg)
     return parsed[b'result']
 
-@vcrcommand(b'debugcallconduit', [], _(b'METHOD'))
+@vcrcommand(b'debugcallconduit', [], _(b'METHOD'), optionalrepo=True)
 def debugcallconduit(ui, repo, name):
     """call Conduit API