Mercurial > hg
comparison mercurial/dirstatemap.py @ 47902:4cade5e944c2
dirstatemap: use the default code to handle "removed" case
This one is very easy.
Differential Revision: https://phab.mercurial-scm.org/D11327
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 16 Jul 2021 17:23:40 +0200 |
parents | 3429f48d486d |
children | 6816ae362ddd |
comparison
equal
deleted
inserted
replaced
47901:3429f48d486d | 47902:4cade5e944c2 |
---|---|
272 return | 272 return |
273 elif not (p1_tracked or p2_tracked) and wc_tracked: | 273 elif not (p1_tracked or p2_tracked) and wc_tracked: |
274 self.addfile(filename, added=True, possibly_dirty=possibly_dirty) | 274 self.addfile(filename, added=True, possibly_dirty=possibly_dirty) |
275 return | 275 return |
276 elif (p1_tracked or p2_tracked) and not wc_tracked: | 276 elif (p1_tracked or p2_tracked) and not wc_tracked: |
277 # XXX might be merged and removed ? | 277 pass |
278 old_entry = self._map.get(filename) | |
279 self._dirs_decr(filename, old_entry=old_entry, remove_variant=True) | |
280 self._map[filename] = DirstateItem.from_v1_data(b'r', 0, 0, 0) | |
281 self.nonnormalset.add(filename) | |
282 return | |
283 elif clean_p2 and wc_tracked: | 278 elif clean_p2 and wc_tracked: |
284 if p1_tracked or self.get(filename) is not None: | 279 if p1_tracked or self.get(filename) is not None: |
285 # XXX the `self.get` call is catching some case in | 280 # XXX the `self.get` call is catching some case in |
286 # `test-merge-remove.t` where the file is tracked in p1, the | 281 # `test-merge-remove.t` where the file is tracked in p1, the |
287 # p1_tracked argument is False. | 282 # p1_tracked argument is False. |