diff mercurial/dispatch.py @ 15233:81c97964d123

alias: don't shadow commands that we only partially matched (issue2993) (BC) Previously, if you set an alias for "ci", it'd also shadow "commit" even though you didn't specify that. This occurred for all commands with explicit short variations.
author Augie Fackler <durin42@gmail.com>
date Tue, 11 Oct 2011 17:20:03 -0500
parents 1e45b92f4fb2
children 01611e7c36ff 9bea3aed6ee1
line wrap: on
line diff
--- a/mercurial/dispatch.py	Tue Oct 11 18:48:45 2011 +0200
+++ b/mercurial/dispatch.py	Tue Oct 11 17:20:03 2011 -0500
@@ -366,7 +366,7 @@
             # definition might not exist or it might not be a cmdalias
             pass
 
-        cmdtable[aliasdef.cmd] = (aliasdef, aliasdef.opts, aliasdef.help)
+        cmdtable[aliasdef.name] = (aliasdef, aliasdef.opts, aliasdef.help)
         if aliasdef.norepo:
             commands.norepo += ' %s' % alias