Patchwork D2023: cmdutil: introduce deprecated aliases

login
register
mail settings
Submitter phabricator
Date Feb. 4, 2018, 11:55 a.m.
Message ID <differential-rev-PHID-DREV-fuujdlim7tllseszdbkh-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27282/
State Superseded
Headers show

Comments

phabricator - Feb. 4, 2018, 11:55 a.m.
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  https://phab.mercurial-scm.org/rHGc8e2d6ed1f9ea4eee7b28250b5aff22433d538b6 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.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/cmdutil.py

CHANGE DETAILS




To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
phabricator - Feb. 5, 2018, 1:56 p.m.
yuja accepted this revision.
yuja added a comment.
This revision is now accepted and ready to land.


  Seems fine, queued, thanks.

REPOSITORY
  rHG Mercurial

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

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,24 @@ 
     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)
+