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.
--- 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')