changeset 30493:762c8a128357

cmdutil: mark dirstateguard as deprecated I sincerely doubt this is used in external code, as grepping the extensions I keep locally (including Facebook's hgexperimental and evolve) indicate nobody outside of core uses this. As such, I'd also welcome just dropping this name forward entirely.
author Augie Fackler <augie@google.com>
date Mon, 21 Nov 2016 21:16:54 -0500
parents 77cd647b04ac
children c1149533676b
files mercurial/cmdutil.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Mon Nov 21 21:06:34 2016 -0500
+++ b/mercurial/cmdutil.py	Mon Nov 21 21:16:54 2016 -0500
@@ -3522,4 +3522,9 @@
         hint = after[0]
     raise error.Abort(_('no %s in progress') % task, hint=hint)
 
-dirstateguard = dirstateguardmod.dirstateguard
+class dirstateguard(dirstateguardmod.dirstateguard):
+    def __init__(self, repo, name):
+        dirstateguardmod.dirstateguard.__init__(self, repo, name)
+        repo.ui.deprecwarn(
+            'dirstateguard has moved from cmdutil to dirstateguard',
+            '4.1')