equal
deleted
inserted
replaced
64 |
64 |
65 def join(self, obj, fname): |
65 def join(self, obj, fname): |
66 return obj._join(fname) |
66 return obj._join(fname) |
67 |
67 |
68 |
68 |
69 def requires_parents_change(func): |
69 def requires_changing_parents(func): |
70 def wrap(self, *args, **kwargs): |
70 def wrap(self, *args, **kwargs): |
71 if not self.pendingparentchange(): |
71 if not self.pendingparentchange(): |
72 msg = 'calling `%s` outside of a changing_parents context' |
72 msg = 'calling `%s` outside of a changing_parents context' |
73 msg %= func.__name__ |
73 msg %= func.__name__ |
74 raise error.ProgrammingError(msg) |
74 raise error.ProgrammingError(msg) |
528 def set_possibly_dirty(self, filename): |
528 def set_possibly_dirty(self, filename): |
529 """record that the current state of the file on disk is unknown""" |
529 """record that the current state of the file on disk is unknown""" |
530 self._dirty = True |
530 self._dirty = True |
531 self._map.set_possibly_dirty(filename) |
531 self._map.set_possibly_dirty(filename) |
532 |
532 |
533 @requires_parents_change |
533 @requires_changing_parents |
534 def update_file_p1( |
534 def update_file_p1( |
535 self, |
535 self, |
536 filename, |
536 filename, |
537 p1_tracked, |
537 p1_tracked, |
538 ): |
538 ): |
568 # the underlying reference might have changed, we will have to |
568 # the underlying reference might have changed, we will have to |
569 # check it. |
569 # check it. |
570 has_meaningful_mtime=False, |
570 has_meaningful_mtime=False, |
571 ) |
571 ) |
572 |
572 |
573 @requires_parents_change |
573 @requires_changing_parents |
574 def update_file( |
574 def update_file( |
575 self, |
575 self, |
576 filename, |
576 filename, |
577 wc_tracked, |
577 wc_tracked, |
578 p1_tracked, |
578 p1_tracked, |