484 if ret: |
484 if ret: |
485 self._dirty = True |
485 self._dirty = True |
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(), |
501 # to make sure we won't miss future size-preserving file content |
498 # to make sure we won't miss future size-preserving file content |
502 # modifications that happen within the same timeslot. |
499 # modifications that happen within the same timeslot. |