D10977: dirstate: drop the last explicit `state` usage in the module

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sun Jul 4 21:55:39 UTC 2021


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

REVISION SUMMARY
  The internal detail of the `state` bytes is not longer exposed to the dirstate
  layer.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -536,7 +536,8 @@
         if not self.in_merge:
             msg = _(b"setting %r to other parent only allowed in merges") % f
             raise error.Abort(msg)
-        if f in self and self[f] == b'n':
+        entry = self._map.get(f)
+        if entry is not None and entry.tracked:
             # merge-like
             self._addpath(f, merged=True)
         else:



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


More information about the Mercurial-devel mailing list