D11125: dirstate: drop duplicated check

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Mon Jul 19 10:40:01 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is covered by the `@requires_parents_change` decorator that this function use.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -560,9 +560,6 @@
         depending of what information ends up being relevant and useful to
         other processing.
         """
-        if not self.pendingparentchange():
-            msg = b'calling `update_file` outside of a parentchange context'
-            raise error.ProgrammingError(msg)
         if merged and (clean_p1 or clean_p2):
             msg = b'`merged` argument incompatible with `clean_p1`/`clean_p2`'
             raise error.ProgrammingError(msg)



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list