equal
deleted
inserted
replaced
6246 fm.end() |
6246 fm.end() |
6247 |
6247 |
6248 def loadcmdtable(ui, name, cmdtable): |
6248 def loadcmdtable(ui, name, cmdtable): |
6249 """Load command functions from specified cmdtable |
6249 """Load command functions from specified cmdtable |
6250 """ |
6250 """ |
6251 cmdtable = cmdtable.copy() |
|
6252 for cmd in list(cmdtable): |
|
6253 if not cmd.startswith('^'): |
|
6254 continue |
|
6255 ui.deprecwarn("old-style command registration '%s' in extension '%s'" |
|
6256 % (cmd, name), '4.8') |
|
6257 entry = cmdtable.pop(cmd) |
|
6258 entry[0].helpbasic = True |
|
6259 cmdtable[cmd[1:]] = entry |
|
6260 |
|
6261 overrides = [cmd for cmd in cmdtable if cmd in table] |
6251 overrides = [cmd for cmd in cmdtable if cmd in table] |
6262 if overrides: |
6252 if overrides: |
6263 ui.warn(_("extension '%s' overrides commands: %s\n") |
6253 ui.warn(_("extension '%s' overrides commands: %s\n") |
6264 % (name, " ".join(overrides))) |
6254 % (name, " ".join(overrides))) |
6265 table.update(cmdtable) |
6255 table.update(cmdtable) |