dispatch: debug message for missing arguments in shell alias
Shows debug message if alias definition contains substitution variables,
but insufficient number of arguments supplied.
--- a/mercurial/dispatch.py Fri Feb 11 03:32:40 2011 +0300
+++ b/mercurial/dispatch.py Fri Feb 11 03:46:28 2011 +0300
@@ -226,6 +226,9 @@
elif int(m.groups()[0]) <= len(args):
return m.group()
else:
+ ui.debug(_("No argument found for substitution"
+ "of %i variable in alias '%s' definition.")
+ % (int(m.groups()[0]), self.name))
return ''
cmd = re.sub(r'\$(\d+|\$)', _checkvar, self.definition[1:])
replace = dict((str(i + 1), arg) for i, arg in enumerate(args))