changeset 47558:811a79bfb8bb

dirstate: drop the last explicit `state` usage in the module The internal detail of the `state` bytes is not longer exposed to the dirstate layer. Differential Revision: https://phab.mercurial-scm.org/D10977
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 04 Jul 2021 02:24:15 +0200
parents ed81f2be5527
children 53a864a60281
files mercurial/dirstate.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Fri Jul 02 20:20:37 2021 +0200
+++ b/mercurial/dirstate.py	Sun Jul 04 02:24:15 2021 +0200
@@ -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: