##// END OF EJS Templates
dispatch: don't rewrap aliases that have the same definition...
Idan Kamara -
r15019:f4b7be3f stable
parent child Browse files
Show More
@@ -354,6 +354,15 b' def addaliases(ui, cmdtable):'
354 # but only if they have been defined prior to the current definition.
354 # but only if they have been defined prior to the current definition.
355 for alias, definition in ui.configitems('alias'):
355 for alias, definition in ui.configitems('alias'):
356 aliasdef = cmdalias(alias, definition, cmdtable)
356 aliasdef = cmdalias(alias, definition, cmdtable)
357
358 try:
359 olddef = cmdtable[aliasdef.cmd][0]
360 if olddef.definition == aliasdef.definition:
361 continue
362 except (KeyError, AttributeError):
363 # definition might not exist or it might not be a cmdalias
364 pass
365
357 cmdtable[aliasdef.cmd] = (aliasdef, aliasdef.opts, aliasdef.help)
366 cmdtable[aliasdef.cmd] = (aliasdef, aliasdef.opts, aliasdef.help)
358 if aliasdef.norepo:
367 if aliasdef.norepo:
359 commands.norepo += ' %s' % alias
368 commands.norepo += ' %s' % alias
General Comments 0
You need to be logged in to leave comments. Login now