# HG changeset patch # User Roman Sokolov # Date 1297385188 -10800 # Node ID d38d500deb087c8c11adf471c19aab9e22cc2963 # Parent 777cef34a890e7203d53463598adeee94a80209d dispatch: debug message for missing arguments in shell alias Shows debug message if alias definition contains substitution variables, but insufficient number of arguments supplied. diff -r 777cef34a890 -r d38d500deb08 mercurial/dispatch.py --- 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))