Mercurial > hg
changeset 12093:cd895084a4cd
alias: on --debug, print expansion when it has invalid arguments
author | Brodie Rao <brodie@bitheap.org> |
---|---|
date | Fri, 27 Aug 2010 20:45:18 -0400 |
parents | 4982fa38e544 |
children | 1db76910f9b4 |
files | mercurial/dispatch.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dispatch.py Fri Aug 27 20:45:11 2010 -0400 +++ b/mercurial/dispatch.py Fri Aug 27 20:45:18 2010 -0400 @@ -293,7 +293,12 @@ if self.definition.startswith('!'): return self.fn(ui, *args, **opts) else: - return util.checksignature(self.fn)(ui, *args, **opts) + try: + util.checksignature(self.fn)(ui, *args, **opts) + except error.SignatureError: + args = ' '.join([self.cmdname] + self.args) + ui.debug("alias '%s' expands to '%s'\n" % (self.name, args)) + raise def addaliases(ui, cmdtable): # aliases are processed after extensions have been loaded, so they