Patchwork D2023: cmdutil: introduce deprecated aliases

login
register
mail settings
Submitter phabricator
Date Feb. 5, 2018, 2:26 p.m.
Message ID <788aa4eb5fca9adee484c9ccb0ed9c53@localhost.localdomain>
Download mbox | patch
Permalink /patch/27315/
State Not Applicable
Headers show

Comments

phabricator - Feb. 5, 2018, 2:26 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb82c6dd15f5d: cmdutil: introduce deprecated aliases (authored by lothiraldan, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D2023?vs=5180&id=5207#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2023?vs=5180&id=5207

REVISION DETAIL
  https://phab.mercurial-scm.org/D2023

AFFECTED FILES
  mercurial/cmdutil.py

CHANGE DETAILS




To: lothiraldan, #hg-reviewers, yuja
Cc: yuja, mercurial-devel

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -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)