mercurial/commands.py
changeset 40394 1feb4b2c8e40
parent 40388 5cb72229f0e9
child 40434 3c0d5016b2be
child 40472 da2e874fe582
--- a/mercurial/commands.py	Fri Oct 19 12:30:49 2018 +0200
+++ b/mercurial/commands.py	Thu Oct 18 21:14:22 2018 +0900
@@ -6139,6 +6139,16 @@
 def loadcmdtable(ui, name, cmdtable):
     """Load command functions from specified cmdtable
     """
+    cmdtable = cmdtable.copy()
+    for cmd in list(cmdtable):
+        if not cmd.startswith('^'):
+            continue
+        ui.deprecwarn("old-style command registration '%s' in extension '%s'"
+                      % (cmd, name), '4.8')
+        entry = cmdtable.pop(cmd)
+        entry[0].helpbasic = True
+        cmdtable[cmd[1:]] = entry
+
     overrides = [cmd for cmd in cmdtable if cmd in table]
     if overrides:
         ui.warn(_("extension '%s' overrides commands: %s\n")