comparison 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
comparison
equal deleted inserted replaced
15023:157a294444b2 15027:1e45b92f4fb2
355 # aliases are processed after extensions have been loaded, so they 355 # aliases are processed after extensions have been loaded, so they
356 # may use extension commands. Aliases can also use other alias definitions, 356 # may use extension commands. Aliases can also use other alias definitions,
357 # but only if they have been defined prior to the current definition. 357 # but only if they have been defined prior to the current definition.
358 for alias, definition in ui.configitems('alias'): 358 for alias, definition in ui.configitems('alias'):
359 aliasdef = cmdalias(alias, definition, cmdtable) 359 aliasdef = cmdalias(alias, definition, cmdtable)
360
361 try:
362 olddef = cmdtable[aliasdef.cmd][0]
363 if olddef.definition == aliasdef.definition:
364 continue
365 except (KeyError, AttributeError):
366 # definition might not exist or it might not be a cmdalias
367 pass
368
360 cmdtable[aliasdef.cmd] = (aliasdef, aliasdef.opts, aliasdef.help) 369 cmdtable[aliasdef.cmd] = (aliasdef, aliasdef.opts, aliasdef.help)
361 if aliasdef.norepo: 370 if aliasdef.norepo:
362 commands.norepo += ' %s' % alias 371 commands.norepo += ' %s' % alias
363 372
364 def _parse(ui, args): 373 def _parse(ui, args):