# HG changeset patch # User Matt Harbison # Date 1517633872 18000 # Node ID 265e91da56fd4e6a9b765caec2c2cfee434de20e # Parent 6289482f6ab596f518741bb58b3b34226ce298df dirstate: drop deprecated methods (API) .. api:: beginparentchange() and endparentchange() have been replaced by the parentchange context manager. diff -r 6289482f6ab5 -r 265e91da56fd mercurial/dirstate.py --- a/mercurial/dirstate.py Fri Feb 02 23:53:57 2018 -0500 +++ b/mercurial/dirstate.py Fri Feb 02 23:57:52 2018 -0500 @@ -99,27 +99,6 @@ # normally, so we don't have a try/finally here on purpose. self._parentwriters -= 1 - def beginparentchange(self): - '''Marks the beginning of a set of changes that involve changing - the dirstate parents. If there is an exception during this time, - the dirstate will not be written when the wlock is released. This - 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): - '''Marks the end of a set of changes that involve changing the - 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 - def pendingparentchange(self): '''Returns true if the dirstate is in the middle of a set of changes that modify the dirstate parent.