##// END OF EJS Templates
dirstatemap: use common code for set_clean...
marmoute -
r48943:f903a357 default
parent child Browse files
Show More
@@ -115,6 +115,15 b' class _dirstatemapcommon(object):'
115 entry.set_possibly_dirty()
115 entry.set_possibly_dirty()
116 self._refresh_entry(filename, entry)
116 self._refresh_entry(filename, entry)
117
117
118 def set_clean(self, filename, mode, size, mtime):
119 """mark a file as back to a clean state"""
120 entry = self[filename]
121 mtime = mtime & rangemask
122 size = size & rangemask
123 entry.set_clean(mode, size, mtime)
124 self._refresh_entry(filename, entry)
125 self.copymap.pop(filename, None)
126
118 def set_tracked(self, filename):
127 def set_tracked(self, filename):
119 new = False
128 new = False
120 entry = self.get(filename)
129 entry = self.get(filename)
@@ -449,14 +458,6 b' class dirstatemap(_dirstatemapcommon):'
449 def _insert_entry(self, f, entry):
458 def _insert_entry(self, f, entry):
450 self._map[f] = entry
459 self._map[f] = entry
451
460
452 def set_clean(self, filename, mode, size, mtime):
453 """mark a file as back to a clean state"""
454 entry = self[filename]
455 mtime = mtime & rangemask
456 size = size & rangemask
457 entry.set_clean(mode, size, mtime)
458 self.copymap.pop(filename, None)
459
460 def reset_state(
461 def reset_state(
461 self,
462 self,
462 filename,
463 filename,
@@ -801,15 +802,6 b' if rustmod is not None:'
801 def _insert_entry(self, f, entry):
802 def _insert_entry(self, f, entry):
802 self._map.addfile(f, entry)
803 self._map.addfile(f, entry)
803
804
804 def set_clean(self, filename, mode, size, mtime):
805 """mark a file as back to a clean state"""
806 entry = self[filename]
807 mtime = mtime & rangemask
808 size = size & rangemask
809 entry.set_clean(mode, size, mtime)
810 self._map.set_dirstate_item(filename, entry)
811 self._map.copymap().pop(filename, None)
812
813 def __setitem__(self, key, value):
805 def __setitem__(self, key, value):
814 assert isinstance(value, DirstateItem)
806 assert isinstance(value, DirstateItem)
815 self._map.set_dirstate_item(key, value)
807 self._map.set_dirstate_item(key, value)
General Comments 0
You need to be logged in to leave comments. Login now