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

login
register
mail settings
Submitter Augie Fackler
Date May 18, 2017, 10:19 p.m.
Message ID <de5ecac77776a09754a4.1495145992@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/20698/
State Superseded
Headers show

Comments

Augie Fackler - May 18, 2017, 10:19 p.m.
# HG changeset patch
# User Augie Fackler <augie@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

Patch

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