Show More
@@ -182,7 +182,7 b' def aliasargs(fn):' | |||||
182 |
|
182 | |||
183 | class cmdalias(object): |
|
183 | class cmdalias(object): | |
184 | def __init__(self, name, definition, cmdtable): |
|
184 | def __init__(self, name, definition, cmdtable): | |
185 | self.name = name |
|
185 | self.name = self.cmd = name | |
186 | self.definition = definition |
|
186 | self.definition = definition | |
187 | self.args = [] |
|
187 | self.args = [] | |
188 | self.opts = [] |
|
188 | self.opts = [] | |
@@ -191,7 +191,11 b' class cmdalias(object):' | |||||
191 | self.badalias = False |
|
191 | self.badalias = False | |
192 |
|
192 | |||
193 | try: |
|
193 | try: | |
194 |
cmdutil.findcmd(self.name, cmdtable |
|
194 | aliases, entry = cmdutil.findcmd(self.name, cmdtable) | |
|
195 | for alias, e in cmdtable.iteritems(): | |||
|
196 | if e is entry: | |||
|
197 | self.cmd = alias | |||
|
198 | break | |||
195 | self.shadows = True |
|
199 | self.shadows = True | |
196 | except error.UnknownCommand: |
|
200 | except error.UnknownCommand: | |
197 | self.shadows = False |
|
201 | self.shadows = False | |
@@ -256,7 +260,7 b' def addaliases(ui, cmdtable):' | |||||
256 | # but only if they have been defined prior to the current definition. |
|
260 | # but only if they have been defined prior to the current definition. | |
257 | for alias, definition in ui.configitems('alias'): |
|
261 | for alias, definition in ui.configitems('alias'): | |
258 | aliasdef = cmdalias(alias, definition, cmdtable) |
|
262 | aliasdef = cmdalias(alias, definition, cmdtable) | |
259 | cmdtable[alias] = (aliasdef, aliasdef.opts, aliasdef.help) |
|
263 | cmdtable[aliasdef.cmd] = (aliasdef, aliasdef.opts, aliasdef.help) | |
260 | if aliasdef.norepo: |
|
264 | if aliasdef.norepo: | |
261 | commands.norepo += ' %s' % alias |
|
265 | commands.norepo += ' %s' % alias | |
262 |
|
266 |
General Comments 0
You need to be logged in to leave comments.
Login now