[PATCH 7 of 7] dirstate: mark {begin,end}parentchange as deprecated

Augie Fackler raf at durin42.com
Thu May 18 18:19:52 EDT 2017


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1495142012 14400
#      Thu May 18 17:13:32 2017 -0400
# Node ID de5ecac77776a09754a45eb3562fbc511feeebc8
# Parent  2eb60fdc3c01a846086f929c39f76ba16f795227
dirstate: mark {begin,end}parentchange as deprecated

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -119,6 +119,8 @@ class dirstate(object):
         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):
@@ -126,6 +128,8 @@ class dirstate(object):
         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
 


More information about the Mercurial-devel mailing list