Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dispatch.py @ 16295:ba42eb722bb3
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 27 Mar 2012 16:17:46 -0500 |
parents | 531e69ff348f 795d591b6ef5 |
children | ee3f423df1b4 |
line wrap: on
line diff
--- a/mercurial/dispatch.py Tue Mar 27 14:37:17 2012 -0500 +++ b/mercurial/dispatch.py Tue Mar 27 16:17:46 2012 -0500 @@ -218,7 +218,7 @@ def aliasargs(fn, givenargs): args = getattr(fn, 'args', []) - if args and givenargs: + if args: cmd = ' '.join(map(util.shellquote, args)) nums = [] @@ -227,7 +227,7 @@ nums.append(num) if num < len(givenargs): return givenargs[num] - return '' + raise util.Abort(_('too few arguments for command alias')) cmd = re.sub(r'\$(\d+|\$)', replacer, cmd) givenargs = [x for i, x in enumerate(givenargs) if i not in nums]