diff mercurial/dispatch.py @ 15027:1e45b92f4fb2

merge with stable
author Matt Mackall <mpm@selenic.com>
date Fri, 05 Aug 2011 16:07:51 -0500
parents 607f1434501d f4b7be3f8430
children 81c97964d123
line wrap: on
line diff
--- a/mercurial/dispatch.py	Thu Aug 04 16:12:58 2011 -0500
+++ b/mercurial/dispatch.py	Fri Aug 05 16:07:51 2011 -0500
@@ -357,6 +357,15 @@
     # but only if they have been defined prior to the current definition.
     for alias, definition in ui.configitems('alias'):
         aliasdef = cmdalias(alias, definition, cmdtable)
+
+        try:
+            olddef = cmdtable[aliasdef.cmd][0]
+            if olddef.definition == aliasdef.definition:
+                continue
+        except (KeyError, AttributeError):
+            # definition might not exist or it might not be a cmdalias
+            pass
+
         cmdtable[aliasdef.cmd] = (aliasdef, aliasdef.opts, aliasdef.help)
         if aliasdef.norepo:
             commands.norepo += ' %s' % alias