##// END OF EJS Templates
dirstatemap: add a common `_drop_entry` method for dirstatemap...
marmoute -
r48944:c057d7c9 default
parent child Browse files
Show More
@@ -107,6 +107,13 b' class _dirstatemapcommon(object):'
107 The fact it is actually new is the responsability of the caller
107 The fact it is actually new is the responsability of the caller
108 """
108 """
109
109
110 def _drop_entry(self, f):
111 """remove any entry for file f
112
113 This should also drop associated copy information
114
115 The fact we actually need to drop it is the responsability of the caller"""
116
110 ### method to manipulate the entries
117 ### method to manipulate the entries
111
118
112 def set_possibly_dirty(self, filename):
119 def set_possibly_dirty(self, filename):
@@ -526,6 +533,10 b' class dirstatemap(_dirstatemapcommon):'
526 )
533 )
527 self._map[filename] = entry
534 self._map[filename] = entry
528
535
536 def _drop_entry(self, f):
537 self._map.pop(f, None)
538 self._copymap.pop(f, None)
539
529
540
530 if rustmod is not None:
541 if rustmod is not None:
531
542
@@ -802,6 +813,9 b' if rustmod is not None:'
802 def _insert_entry(self, f, entry):
813 def _insert_entry(self, f, entry):
803 self._map.addfile(f, entry)
814 self._map.addfile(f, entry)
804
815
816 def _drop_entry(self, f):
817 self._map.drop_item_and_copy_source(f)
818
805 def __setitem__(self, key, value):
819 def __setitem__(self, key, value):
806 assert isinstance(value, DirstateItem)
820 assert isinstance(value, DirstateItem)
807 self._map.set_dirstate_item(key, value)
821 self._map.set_dirstate_item(key, value)
General Comments 0
You need to be logged in to leave comments. Login now