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

login
register
mail settings
Submitter Augie Fackler
Date May 19, 2017, 9:38 p.m.
Message ID <712593263a6be0c7250a.1495229927@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/20743/
State Accepted
Headers show

Comments

Augie Fackler - May 19, 2017, 9:38 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1495142012 14400
#      Thu May 18 17:13:32 2017 -0400
# Node ID 712593263a6be0c7250a2f31dbb1693084410916
# Parent  bf1e831b74a414ce05f006176c0f1d79a6f8dcd0
dirstate: mark {begin,end}parentchange as deprecated
Yuya Nishihara - May 20, 2017, 5 a.m.
On Fri, 19 May 2017 17:38:47 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1495142012 14400
> #      Thu May 18 17:13:32 2017 -0400
> # Node ID 712593263a6be0c7250a2f31dbb1693084410916
> # Parent  bf1e831b74a414ce05f006176c0f1d79a6f8dcd0
> dirstate: mark {begin,end}parentchange as deprecated

Flagged this as (API).

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -124,6 +124,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):
@@ -131,6 +133,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