Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dispatch.py @ 11676:e4357c214bf1 stable
alias: ensure checksignature() is applied directly to the command (issue2286)
Aliased commands that received bad arguments would raise TypeError instead of
SignatureError. This only affected commands that weren't wrapped by extensions.
Using util.checksignature() in cmdalias.__call__() ensures SignatureError is
raised correctly.
author | Brodie Rao <brodie@bitheap.org> |
---|---|
date | Thu, 22 Jul 2010 15:26:26 -0400 |
parents | f92f8921a5cc |
children | c5e555e064d0 b6360a113478 9cbc62f68328 |
line wrap: on
line diff
--- a/mercurial/dispatch.py Sat Jul 24 00:38:08 2010 +0200 +++ b/mercurial/dispatch.py Thu Jul 22 15:26:26 2010 -0400 @@ -248,7 +248,7 @@ if self.shadows: ui.debug("alias '%s' shadows command\n" % self.name) - return self.fn(ui, *args, **opts) + return util.checksignature(self.fn)(ui, *args, **opts) def addaliases(ui, cmdtable): # aliases are processed after extensions have been loaded, so they