changeset 35910:b82c6dd15f5d

cmdutil: introduce deprecated aliases c8e2d6ed1f9e moved some objects used by Evolve and hence broke the latest Evolve revision. Next Evolve version will use the new objects when available but introduce deprecated aliases so users using older version of Evolve won't have a broken Evolve extension. Differential Revision: https://phab.mercurial-scm.org/D2023
author Boris Feld <boris.feld@octobus.net>
date Sun, 04 Feb 2018 12:00:17 +0100
parents 89c81739ffa7
children 704095e27c5c
files mercurial/cmdutil.py
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Mon Feb 05 18:39:41 2018 +0800
+++ b/mercurial/cmdutil.py	Sun Feb 04 12:00:17 2018 +0100
@@ -3124,3 +3124,23 @@
     if after[1]:
         hint = after[0]
     raise error.Abort(_('no %s in progress') % task, hint=hint)
+
+class changeset_printer(logcmdutil.changesetprinter):
+
+    def __init__(self, ui, *args, **kwargs):
+        msg = ("'cmdutil.changeset_printer' is deprecated, "
+               "use 'logcmdutil.logcmdutil'")
+        ui.deprecwarn(msg, "4.6")
+        super(changeset_printer, self).__init__(ui, *args, **kwargs)
+
+def displaygraph(ui, *args, **kwargs):
+    msg = ("'cmdutil.displaygraph' is deprecated, "
+           "use 'logcmdutil.displaygraph'")
+    ui.deprecwarn(msg, "4.6")
+    return logcmdutil.displaygraph(ui, *args, **kwargs)
+
+def show_changeset(ui, *args, **kwargs):
+    msg = ("'cmdutil.show_changeset' is deprecated, "
+           "use 'logcmdutil.changesetdisplayer'")
+    ui.deprecwarn(msg, "4.6")
+    return logcmdutil.changesetdisplayer(ui, *args, **kwargs)