# HG changeset patch # User Pierre-Yves David # Date 2021-07-15 15:24:09 # Node ID 37825a85d3b013ca5fe1907c26894058e749e4db # Parent 0efaa1bbad2bfb3568ba2d72c47d67c7b5cace07 dirstate: replace a dead conditional branch with an assert in `update_file` This is a case we never meet, so lets trim it away to simplify the code before more changes. Differential Revision: https://phab.mercurial-scm.org/D11128 diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -567,8 +567,7 @@ class dirstate(object): self._drop(filename) elif merged: assert wc_tracked - if not self.in_merge: - self.normallookup(filename) + assert self.in_merge # we are never in the "normallookup" case self.otherparent(filename) elif not (p1_tracked or p2_tracked) and wc_tracked: self._addpath(filename, added=True, possibly_dirty=possibly_dirty)