commands: minor refactoring
Renamed local variable i to entry in helpcmd.
--- a/mercurial/commands.py Fri Nov 20 02:34:56 2009 +0100
+++ b/mercurial/commands.py Fri Nov 20 14:11:05 2009 +0200
@@ -1476,7 +1476,7 @@
ui.write('\n')
try:
- aliases, i = cmdutil.findcmd(name, table, False)
+ aliases, entry = cmdutil.findcmd(name, table, False)
except error.AmbiguousCommand, inst:
# py3k fix: except vars can't be used outside the scope of the
# except block, nor can be used inside a lambda. python issue4617
@@ -1486,11 +1486,11 @@
return
# synopsis
- if len(i) > 2:
- if i[2].startswith('hg'):
- ui.write("%s\n" % i[2])
+ if len(entry) > 2:
+ if entry[2].startswith('hg'):
+ ui.write("%s\n" % entry[2])
else:
- ui.write('hg %s %s\n' % (aliases[0], i[2]))
+ ui.write('hg %s %s\n' % (aliases[0], entry[2]))
else:
ui.write('hg %s\n' % aliases[0])
@@ -1499,7 +1499,7 @@
ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:]))
# description
- doc = gettext(i[0].__doc__)
+ doc = gettext(entry[0].__doc__)
if not doc:
doc = _("(no help text available)")
if ui.quiet:
@@ -1508,8 +1508,8 @@
if not ui.quiet:
# options
- if i[1]:
- option_lists.append((_("options:\n"), i[1]))
+ if entry[1]:
+ option_lists.append((_("options:\n"), entry[1]))
addglobalopts(False)