##// END OF EJS Templates
phabricator: make `hg debugcallconduit` work outside a hg repo...
Pulkit Goyal -
r42628:16312ea4 default
parent child Browse files
Show More
@@ -125,7 +125,7 b' colortable = {'
125 )),
125 )),
126 ]
126 ]
127
127
128 def vcrcommand(name, flags, spec, helpcategory=None):
128 def vcrcommand(name, flags, spec, helpcategory=None, optionalrepo=False):
129 fullflags = flags + _VCR_FLAGS
129 fullflags = flags + _VCR_FLAGS
130 def hgmatcher(r1, r2):
130 def hgmatcher(r1, r2):
131 if r1.uri != r2.uri or r1.method != r2.method:
131 if r1.uri != r2.uri or r1.method != r2.method:
@@ -156,7 +156,8 b' def vcrcommand(name, flags, spec, helpca'
156 return fn(*args, **kwargs)
156 return fn(*args, **kwargs)
157 inner.__name__ = fn.__name__
157 inner.__name__ = fn.__name__
158 inner.__doc__ = fn.__doc__
158 inner.__doc__ = fn.__doc__
159 return command(name, fullflags, spec, helpcategory=helpcategory)(inner)
159 return command(name, fullflags, spec, helpcategory=helpcategory,
160 optionalrepo=optionalrepo)(inner)
160 return decorate
161 return decorate
161
162
162 def urlencodenested(params):
163 def urlencodenested(params):
@@ -242,7 +243,7 b' def callconduit(ui, name, params):'
242 raise error.Abort(msg)
243 raise error.Abort(msg)
243 return parsed[b'result']
244 return parsed[b'result']
244
245
245 @vcrcommand(b'debugcallconduit', [], _(b'METHOD'))
246 @vcrcommand(b'debugcallconduit', [], _(b'METHOD'), optionalrepo=True)
246 def debugcallconduit(ui, repo, name):
247 def debugcallconduit(ui, repo, name):
247 """call Conduit API
248 """call Conduit API
248
249
General Comments 0
You need to be logged in to leave comments. Login now