Mercurial > hg
comparison mercurial/dirstatemap.py @ 49117:4c562108384f
dirstatemap: move `_refresh_entry` out of the common methods
This is only used in the Python implementation now
Differential Revision: https://phab.mercurial-scm.org/D12515
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Mon, 28 Mar 2022 23:39:28 +0200 |
parents | cebb263c865c |
children | 2c78dd3f11de |
comparison
equal
deleted
inserted
replaced
49116:cebb263c865c | 49117:4c562108384f |
---|---|
95 """decrement the dirstate counter if applicable | 95 """decrement the dirstate counter if applicable |
96 | 96 |
97 This might be a no-op for some subclasses who deal with directory | 97 This might be a no-op for some subclasses who deal with directory |
98 tracking in a different way. | 98 tracking in a different way. |
99 """ | 99 """ |
100 | |
101 def _refresh_entry(self, f, entry): | |
102 """record updated state of an entry""" | |
103 | 100 |
104 ### disk interaction | 101 ### disk interaction |
105 | 102 |
106 def _opendirstatefile(self): | 103 def _opendirstatefile(self): |
107 fp, mode = txnutil.trypending(self._root, self._opener, self._filename) | 104 fp, mode = txnutil.trypending(self._root, self._opener, self._filename) |
521 entry = self[filename] | 518 entry = self[filename] |
522 entry.set_possibly_dirty() | 519 entry.set_possibly_dirty() |
523 self._refresh_entry(filename, entry) | 520 self._refresh_entry(filename, entry) |
524 | 521 |
525 def _refresh_entry(self, f, entry): | 522 def _refresh_entry(self, f, entry): |
523 """record updated state of an entry""" | |
526 if not entry.any_tracked: | 524 if not entry.any_tracked: |
527 self._map.pop(f, None) | 525 self._map.pop(f, None) |
528 | 526 |
529 def _drop_entry(self, f): | 527 def _drop_entry(self, f): |
530 """remove any entry for file f | 528 """remove any entry for file f |