##// END OF EJS Templates
dirstatemap: add a common `_refresh_entry` method for dirstatemap...
marmoute -
r48938:a1a6569b default
parent child Browse files
Show More
@@ -98,6 +98,9 b' class _dirstatemapcommon(object):'
98 tracking in a different way.
98 tracking in a different way.
99 """
99 """
100
100
101 def _refresh_entry(self, f, entry):
102 """record updated state of an entry"""
103
101
104
102 class dirstatemap(_dirstatemapcommon):
105 class dirstatemap(_dirstatemapcommon):
103 """Map encapsulating the dirstate's contents.
106 """Map encapsulating the dirstate's contents.
@@ -381,6 +384,10 b' class dirstatemap(_dirstatemapcommon):'
381
384
382 ### code related to manipulation of entries and copy-sources
385 ### code related to manipulation of entries and copy-sources
383
386
387 def _refresh_entry(self, f, entry):
388 if not entry.any_tracked:
389 self._map.pop(f, None)
390
384 def set_possibly_dirty(self, filename):
391 def set_possibly_dirty(self, filename):
385 """record that the current state of the file on disk is unknown"""
392 """record that the current state of the file on disk is unknown"""
386 self[filename].set_possibly_dirty()
393 self[filename].set_possibly_dirty()
@@ -770,6 +777,12 b' if rustmod is not None:'
770
777
771 ### code related to manipulation of entries and copy-sources
778 ### code related to manipulation of entries and copy-sources
772
779
780 def _refresh_entry(self, f, entry):
781 if not entry.any_tracked:
782 self._map.drop_item_and_copy_source(f)
783 else:
784 self._map.addfile(f, entry)
785
773 def set_possibly_dirty(self, filename):
786 def set_possibly_dirty(self, filename):
774 """record that the current state of the file on disk is unknown"""
787 """record that the current state of the file on disk is unknown"""
775 entry = self[filename]
788 entry = self[filename]
General Comments 0
You need to be logged in to leave comments. Login now