# HG changeset patch # User Brodie Rao # Date 1282956318 14400 # Node ID cd895084a4cd80abd241060705090aa7c3d9f39a # Parent 4982fa38e544520e76f7f6bc974f6c60959eb66d alias: on --debug, print expansion when it has invalid arguments diff -r 4982fa38e544 -r cd895084a4cd mercurial/dispatch.py --- 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