Patchwork [10,of,10,layering] cmdutil: turn forward of checkunresolved into a deprecation warning

login
register
mail settings
Submitter Augie Fackler
Date Nov. 22, 2016, 3:05 a.m.
Message ID <3302f16200e1ca7b74cf.1479783925@imladris.local>
Download mbox | patch
Permalink /patch/17685/
State Accepted
Headers show

Comments

Augie Fackler - Nov. 22, 2016, 3:05 a.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1479782206 18000
#      Mon Nov 21 21:36:46 2016 -0500
# Node ID 3302f16200e1ca7b74cf17a27e4fff0d6bb5ebf3
# Parent  6302626248347074dea4080bbd22ccb26342cf40
cmdutil: turn forward of checkunresolved into a deprecation warning

As with dirstateguard, I really doubt anyone outside core was using
this, as my grep over the repositories I keep locally suggests nobody
was using this. If others are comfortable with it, let's drop the
forward entirely.

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -3408,7 +3408,10 @@  def command(table):
 
     return cmd
 
-checkunresolved = mergeutil.checkunresolved
+def checkunresolved(ms):
+    ms._repo.ui.deprecwarn('checkunresolved moved from cmdutil to mergeutil',
+                           '4.1')
+    return mergeutil.checkunresolved(ms)
 
 # a list of (ui, repo, otherpeer, opts, missing) functions called by
 # commands.outgoing.  "missing" is "missing" of the result of