##// END OF EJS Templates
alias: print what command is being shadowed in debug message
Brodie Rao -
r12092:4982fa38 default
parent child Browse files
Show More
@@ -190,6 +190,7 b' def aliasargs(fn):'
190 class cmdalias(object):
190 class cmdalias(object):
191 def __init__(self, name, definition, cmdtable):
191 def __init__(self, name, definition, cmdtable):
192 self.name = self.cmd = name
192 self.name = self.cmd = name
193 self.cmdname = ''
193 self.definition = definition
194 self.definition = definition
194 self.args = []
195 self.args = []
195 self.opts = []
196 self.opts = []
@@ -234,7 +235,7 b' class cmdalias(object):'
234 return
235 return
235
236
236 args = shlex.split(self.definition)
237 args = shlex.split(self.definition)
237 cmd = args.pop(0)
238 self.cmdname = cmd = args.pop(0)
238 args = map(util.expandpath, args)
239 args = map(util.expandpath, args)
239
240
240 for invalidarg in ("--cwd", "-R", "--repository", "--repo"):
241 for invalidarg in ("--cwd", "-R", "--repository", "--repo"):
@@ -286,7 +287,8 b' class cmdalias(object):'
286
287
287 def __call__(self, ui, *args, **opts):
288 def __call__(self, ui, *args, **opts):
288 if self.shadows:
289 if self.shadows:
289 ui.debug("alias '%s' shadows command\n" % self.name)
290 ui.debug("alias '%s' shadows command '%s'\n" %
291 (self.name, self.cmdname))
290
292
291 if self.definition.startswith('!'):
293 if self.definition.startswith('!'):
292 return self.fn(ui, *args, **opts)
294 return self.fn(ui, *args, **opts)
General Comments 0
You need to be logged in to leave comments. Login now