This is only used in the Python implementation now
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
This is only used in the Python implementation now
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/dirstatemap.py (4 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
08163fd98097 | 5c0d09b9708e | Raphaël Gomès | Mar 28 2022, 5:39 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare | ||
Closed | Alphare |
def _dirs_decr(self, filename, old_entry=None, remove_variant=False): | def _dirs_decr(self, filename, old_entry=None, remove_variant=False): | ||||
"""decrement the dirstate counter if applicable | """decrement the dirstate counter if applicable | ||||
This might be a no-op for some subclasses who deal with directory | This might be a no-op for some subclasses who deal with directory | ||||
tracking in a different way. | tracking in a different way. | ||||
""" | """ | ||||
def _refresh_entry(self, f, entry): | |||||
"""record updated state of an entry""" | |||||
### disk interaction | ### disk interaction | ||||
def _opendirstatefile(self): | def _opendirstatefile(self): | ||||
fp, mode = txnutil.trypending(self._root, self._opener, self._filename) | fp, mode = txnutil.trypending(self._root, self._opener, self._filename) | ||||
if self._pendingmode is not None and self._pendingmode != mode: | if self._pendingmode is not None and self._pendingmode != mode: | ||||
fp.close() | fp.close() | ||||
raise error.Abort( | raise error.Abort( | ||||
_(b'working directory state may be changed parallelly') | _(b'working directory state may be changed parallelly') | ||||
def set_possibly_dirty(self, filename): | def set_possibly_dirty(self, filename): | ||||
"""record that the current state of the file on disk is unknown""" | """record that the current state of the file on disk is unknown""" | ||||
entry = self[filename] | entry = self[filename] | ||||
entry.set_possibly_dirty() | entry.set_possibly_dirty() | ||||
self._refresh_entry(filename, entry) | self._refresh_entry(filename, entry) | ||||
def _refresh_entry(self, f, entry): | def _refresh_entry(self, f, entry): | ||||
"""record updated state of an entry""" | |||||
if not entry.any_tracked: | if not entry.any_tracked: | ||||
self._map.pop(f, None) | self._map.pop(f, None) | ||||
def _drop_entry(self, f): | def _drop_entry(self, f): | ||||
"""remove any entry for file f | """remove any entry for file f | ||||
This should also drop associated copy information | This should also drop associated copy information | ||||