Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dispatch.py @ 21556:5e13507a3b4e stable
alias: fix loss of non-zero return code in command aliases
This also includes test for shell aliases. It avoid using "false" command
because "man false" does not say "exit with 1" but "exit with a status code
indicating failure."
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 17 May 2014 14:43:06 +0900 |
parents | 9a09a625bc93 |
children | c5afb07c33d3 |
line wrap: on
line diff
--- a/mercurial/dispatch.py Thu May 15 23:53:21 2014 -0700 +++ b/mercurial/dispatch.py Sat May 17 14:43:06 2014 +0900 @@ -445,7 +445,7 @@ return self.fn(ui, *args, **opts) else: try: - util.checksignature(self.fn)(ui, *args, **opts) + return 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))