[Commented On] D11127: dirstate-map: do not use `size` to gate copy dropping during remove_file

baymax (Baymax, Your Personal Patch-care Companion) phabricator at mercurial-scm.org
Tue Jul 20 07:22:15 UTC 2021


baymax added a comment.
baymax updated this revision to Diff 29546.


  ✅ refresh by Heptapod after a successful CI run (🐙 💚)

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11127?vs=29393&id=29546

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11127/new/

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

AFFECTED FILES
  mercurial/dirstatemap.py

CHANGE DETAILS

diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -222,7 +222,7 @@
                 elif entry.from_p2:
                     size = FROM_P2
                     self.otherparentset.add(f)
-        if size == 0:
+        if entry is not None and not (entry.merged or entry.from_p2):
             self.copymap.pop(f, None)
 
         if entry is not None and not entry.removed and "_dirs" in self.__dict__:



To: marmoute, #hg-reviewers, Alphare, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210720/7d1f0745/attachment-0002.html>


More information about the Mercurial-patches mailing list