# HG changeset patch # User Pierre-Yves David # Date 2021-07-04 00:24:15 # Node ID 811a79bfb8bb7f0fdb6138b4114940b91dad0b01 # Parent ed81f2be5527d1b8a34640337ecf99f724cf2c8e 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 diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -536,7 +536,8 @@ class dirstate(object): 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: