mercurial/commands.py
changeset 42336 fa4b13e81f60
parent 42305 eefe3d669beb
child 42418 9803323048b6
equal deleted inserted replaced
42335:38b7b45627a2 42336:fa4b13e81f60
  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)