Mercurial > hg
comparison mercurial/dirstatemap.py @ 47907:bbae583333e9
dirstatemap: also discard item from sets
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.
Differential Revision: https://phab.mercurial-scm.org/D11332
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 20 Aug 2021 16:12:33 +0200 |
parents | 50ded8854f8d |
children | e02f9af7aed1 |
comparison
equal
deleted
inserted
replaced
47906:50ded8854f8d | 47907:bbae583333e9 |
---|---|
197 old_entry = self.get(f) | 197 old_entry = self.get(f) |
198 self._dirs_incr(f, old_entry) | 198 self._dirs_incr(f, old_entry) |
199 self._map[f] = new_entry | 199 self._map[f] = new_entry |
200 if new_entry.dm_nonnormal: | 200 if new_entry.dm_nonnormal: |
201 self.nonnormalset.add(f) | 201 self.nonnormalset.add(f) |
202 else: | |
203 self.nonnormalset.discard(f) | |
202 if new_entry.dm_otherparent: | 204 if new_entry.dm_otherparent: |
203 self.otherparentset.add(f) | 205 self.otherparentset.add(f) |
206 else: | |
207 self.otherparentset.discard(f) | |
204 | 208 |
205 def reset_state( | 209 def reset_state( |
206 self, | 210 self, |
207 filename, | 211 filename, |
208 wc_tracked, | 212 wc_tracked, |