[Request] [+ ] D11332: dirstatemap: also discard item from sets

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sat Aug 21 09:57:47 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This seems more consistent to do that. I don't think any test was actually
  barking about it, but the code feels a bit more robust now.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -199,8 +199,12 @@
         self._map[f] = new_entry
         if new_entry.dm_nonnormal:
             self.nonnormalset.add(f)
+        else:
+            self.nonnormalset.discard(f)
         if new_entry.dm_otherparent:
             self.otherparentset.add(f)
+        else:
+            self.otherparentset.discard(f)
 
     def reset_state(
         self,



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210821/dca1280b/attachment.html>


More information about the Mercurial-patches mailing list