Mercurial > hg
comparison mercurial/dirstate.py @ 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 | 20f366db3e5f |
children | ff97e793ed36 |
comparison
equal
deleted
inserted
replaced
47672:0efaa1bbad2b | 47673:37825a85d3b0 |
---|---|
565 raise error.ProgrammingError(msg) | 565 raise error.ProgrammingError(msg) |
566 if not (p1_tracked or p2_tracked or wc_tracked): | 566 if not (p1_tracked or p2_tracked or wc_tracked): |
567 self._drop(filename) | 567 self._drop(filename) |
568 elif merged: | 568 elif merged: |
569 assert wc_tracked | 569 assert wc_tracked |
570 if not self.in_merge: | 570 assert self.in_merge # we are never in the "normallookup" case |
571 self.normallookup(filename) | |
572 self.otherparent(filename) | 571 self.otherparent(filename) |
573 elif not (p1_tracked or p2_tracked) and wc_tracked: | 572 elif not (p1_tracked or p2_tracked) and wc_tracked: |
574 self._addpath(filename, added=True, possibly_dirty=possibly_dirty) | 573 self._addpath(filename, added=True, possibly_dirty=possibly_dirty) |
575 self._map.copymap.pop(filename, None) | 574 self._map.copymap.pop(filename, None) |
576 elif (p1_tracked or p2_tracked) and not wc_tracked: | 575 elif (p1_tracked or p2_tracked) and not wc_tracked: |