##// END OF EJS Templates
dirstate: make it mandatory to provide parentfiledata in `set_clean`...
marmoute -
r49208:080151f1 default
parent child Browse files
Show More
@@ -257,7 +257,7 b' class gitdirstate(object):'
257 if match(p):
257 if match(p):
258 yield p
258 yield p
259
259
260 def set_clean(self, f, parentfiledata=None):
260 def set_clean(self, f, parentfiledata):
261 """Mark a file normal and clean."""
261 """Mark a file normal and clean."""
262 # TODO: for now we just let libgit2 re-stat the file. We can
262 # TODO: for now we just let libgit2 re-stat the file. We can
263 # clearly do better.
263 # clearly do better.
@@ -486,15 +486,12 b' class dirstate(object):'
486 return ret
486 return ret
487
487
488 @requires_no_parents_change
488 @requires_no_parents_change
489 def set_clean(self, filename, parentfiledata=None):
489 def set_clean(self, filename, parentfiledata):
490 """record that the current state of the file on disk is known to be clean"""
490 """record that the current state of the file on disk is known to be clean"""
491 self._dirty = True
491 self._dirty = True
492 if parentfiledata:
493 (mode, size, mtime) = parentfiledata
494 else:
495 (mode, size, mtime) = self._get_filedata(filename)
496 if not self._map[filename].tracked:
492 if not self._map[filename].tracked:
497 self._check_new_tracked_filename(filename)
493 self._check_new_tracked_filename(filename)
494 (mode, size, mtime) = parentfiledata
498 self._map.set_clean(filename, mode, size, mtime)
495 self._map.set_clean(filename, mode, size, mtime)
499 if mtime > self._lastnormaltime:
496 if mtime > self._lastnormaltime:
500 # Remember the most recent modification timeslot for status(),
497 # Remember the most recent modification timeslot for status(),
General Comments 0
You need to be logged in to leave comments. Login now