mercurial/commands.py
changeset 40394 1feb4b2c8e40
parent 40388 5cb72229f0e9
child 40434 3c0d5016b2be
child 40472 da2e874fe582
equal deleted inserted replaced
40393:229d23cdb203 40394:1feb4b2c8e40
  6137     fm.end()
  6137     fm.end()
  6138 
  6138 
  6139 def loadcmdtable(ui, name, cmdtable):
  6139 def loadcmdtable(ui, name, cmdtable):
  6140     """Load command functions from specified cmdtable
  6140     """Load command functions from specified cmdtable
  6141     """
  6141     """
       
  6142     cmdtable = cmdtable.copy()
       
  6143     for cmd in list(cmdtable):
       
  6144         if not cmd.startswith('^'):
       
  6145             continue
       
  6146         ui.deprecwarn("old-style command registration '%s' in extension '%s'"
       
  6147                       % (cmd, name), '4.8')
       
  6148         entry = cmdtable.pop(cmd)
       
  6149         entry[0].helpbasic = True
       
  6150         cmdtable[cmd[1:]] = entry
       
  6151 
  6142     overrides = [cmd for cmd in cmdtable if cmd in table]
  6152     overrides = [cmd for cmd in cmdtable if cmd in table]
  6143     if overrides:
  6153     if overrides:
  6144         ui.warn(_("extension '%s' overrides commands: %s\n")
  6154         ui.warn(_("extension '%s' overrides commands: %s\n")
  6145                 % (name, " ".join(overrides)))
  6155                 % (name, " ".join(overrides)))
  6146     table.update(cmdtable)
  6156     table.update(cmdtable)