Mercurial > hg
comparison mercurial/dirstatemap.py @ 49116:cebb263c865c
dirstatemap: move `_drop_entry` out of the common methods
Only the Python implementation uses it.
Differential Revision: https://phab.mercurial-scm.org/D12514
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Mon, 28 Mar 2022 23:38:05 +0200 |
parents | d953a62e4f78 |
children | 4c562108384f |
comparison
equal
deleted
inserted
replaced
49115:d953a62e4f78 | 49116:cebb263c865c |
---|---|
98 tracking in a different way. | 98 tracking in a different way. |
99 """ | 99 """ |
100 | 100 |
101 def _refresh_entry(self, f, entry): | 101 def _refresh_entry(self, f, entry): |
102 """record updated state of an entry""" | 102 """record updated state of an entry""" |
103 | |
104 def _drop_entry(self, f): | |
105 """remove any entry for file f | |
106 | |
107 This should also drop associated copy information | |
108 | |
109 The fact we actually need to drop it is the responsability of the caller""" | |
110 | 103 |
111 ### disk interaction | 104 ### disk interaction |
112 | 105 |
113 def _opendirstatefile(self): | 106 def _opendirstatefile(self): |
114 fp, mode = txnutil.trypending(self._root, self._opener, self._filename) | 107 fp, mode = txnutil.trypending(self._root, self._opener, self._filename) |
532 def _refresh_entry(self, f, entry): | 525 def _refresh_entry(self, f, entry): |
533 if not entry.any_tracked: | 526 if not entry.any_tracked: |
534 self._map.pop(f, None) | 527 self._map.pop(f, None) |
535 | 528 |
536 def _drop_entry(self, f): | 529 def _drop_entry(self, f): |
530 """remove any entry for file f | |
531 | |
532 This should also drop associated copy information | |
533 | |
534 The fact we actually need to drop it is the responsability of the caller""" | |
537 self._map.pop(f, None) | 535 self._map.pop(f, None) |
538 self.copymap.pop(f, None) | 536 self.copymap.pop(f, None) |
539 | 537 |
540 | 538 |
541 if rustmod is not None: | 539 if rustmod is not None: |