changeset 47673:37825a85d3b0

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 15 Jul 2021 17:24:09 +0200
parents 0efaa1bbad2b
children ff97e793ed36
files mercurial/dirstate.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)