dirstate: mark {begin,end}parentchange as deprecated (API)
authorAugie Fackler <augie@google.com>
Thu, 18 May 2017 17:13:32 -0400
changeset 32391 b2de7fced2fa
parent 32390 c568c187102f
child 32392 4bffe2421f34
dirstate: mark {begin,end}parentchange as deprecated (API)
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Thu May 18 17:11:24 2017 -0400
+++ b/mercurial/dirstate.py	Thu May 18 17:13:32 2017 -0400
@@ -124,6 +124,8 @@
         prevents writing an incoherent dirstate where the parent doesn't
         match the contents.
         '''
+        self._ui.deprecwarn('beginparentchange is obsoleted by the '
+                            'parentchange context manager.', '4.3')
         self._parentwriters += 1
 
     def endparentchange(self):
@@ -131,6 +133,8 @@
         dirstate parents. Once all parent changes have been marked done,
         the wlock will be free to write the dirstate on release.
         '''
+        self._ui.deprecwarn('endparentchange is obsoleted by the '
+                            'parentchange context manager.', '4.3')
         if self._parentwriters > 0:
             self._parentwriters -= 1