# HG changeset patch # User Pierre-Yves David # Date 1626362649 -7200 # 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 -r 0efaa1bbad2b -r 37825a85d3b0 mercurial/dirstate.py --- a/mercurial/dirstate.py Wed Jul 14 23:32:35 2021 +0200 +++ b/mercurial/dirstate.py Thu Jul 15 17:24:09 2021 +0200 @@ -567,8 +567,7 @@ 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)