Patchwork D6126: dirstate: remove obsolete reference to dirstate.beginparentchange

login
register
mail settings
Submitter phabricator
Date March 13, 2019, 6:04 p.m.
Message ID <differential-rev-PHID-DREV-ewewcku73vg5g2vrrgu7-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39237/
State Superseded
Headers show

Comments

phabricator - March 13, 2019, 6:04 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The only valid API since https://phab.mercurial-scm.org/rHG265e91da56fd4e6a9b765caec2c2cfee434de20e (dirstate: drop deprecated
  methods (API), 2018-02-02) is the context manager returned from
  dirstate.parentchange().

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6126

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -289,8 +289,8 @@ 
         See localrepo.setparents()
         """
         if self._parentwriters == 0:
-            raise ValueError("cannot set dirstate parent without "
-                             "calling dirstate.beginparentchange")
+            raise ValueError("cannot set dirstate parent outside of "
+                             "dirstate.parentchange context manager")
 
         self._dirty = True
         oldp2 = self._pl[1]