Patchwork D11327: dirstatemap: use the default code to handle "removed" case

login
register
mail settings
Submitter phabricator
Date Aug. 21, 2021, 9:57 a.m.
Message ID <differential-rev-PHID-DREV-d3sjhiawc5nnweck7m3a-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49641/
State Superseded
Headers show

Comments

phabricator - Aug. 21, 2021, 9:57 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This one is very easy.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11327

AFFECTED FILES
  mercurial/dirstatemap.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -274,12 +274,7 @@ 
             self.addfile(filename, added=True, possibly_dirty=possibly_dirty)
             return
         elif (p1_tracked or p2_tracked) and not wc_tracked:
-            # XXX might be merged and removed ?
-            old_entry = self._map.get(filename)
-            self._dirs_decr(filename, old_entry=old_entry, remove_variant=True)
-            self._map[filename] = DirstateItem.from_v1_data(b'r', 0, 0, 0)
-            self.nonnormalset.add(filename)
-            return
+            pass
         elif clean_p2 and wc_tracked:
             if p1_tracked or self.get(filename) is not None:
                 # XXX the `self.get` call is catching some case in