Show More
@@ -108,21 +108,6 b' class _dirstatemapcommon:' | |||
|
108 | 108 | |
|
109 | 109 | The fact we actually need to drop it is the responsability of the caller""" |
|
110 | 110 | |
|
111 | ### method to manipulate the entries | |
|
112 | ||
|
113 | def set_untracked(self, f): | |
|
114 | """Mark a file as no longer tracked in the dirstate map""" | |
|
115 | entry = self.get(f) | |
|
116 | if entry is None: | |
|
117 | return False | |
|
118 | else: | |
|
119 | self._dirs_decr(f, old_entry=entry, remove_variant=not entry.added) | |
|
120 | if not entry.p2_info: | |
|
121 | self.copymap.pop(f, None) | |
|
122 | entry.set_untracked() | |
|
123 | self._refresh_entry(f, entry) | |
|
124 | return True | |
|
125 | ||
|
126 | 111 | ### disk interaction |
|
127 | 112 | |
|
128 | 113 | def _opendirstatefile(self): |
@@ -517,6 +502,19 b' class dirstatemap(_dirstatemapcommon):' | |||
|
517 | 502 | self._refresh_entry(filename, entry) |
|
518 | 503 | return new |
|
519 | 504 | |
|
505 | def set_untracked(self, f): | |
|
506 | """Mark a file as no longer tracked in the dirstate map""" | |
|
507 | entry = self.get(f) | |
|
508 | if entry is None: | |
|
509 | return False | |
|
510 | else: | |
|
511 | self._dirs_decr(f, old_entry=entry, remove_variant=not entry.added) | |
|
512 | if not entry.p2_info: | |
|
513 | self.copymap.pop(f, None) | |
|
514 | entry.set_untracked() | |
|
515 | self._refresh_entry(f, entry) | |
|
516 | return True | |
|
517 | ||
|
520 | 518 | def set_clean(self, filename, mode, size, mtime): |
|
521 | 519 | """mark a file as back to a clean state""" |
|
522 | 520 | entry = self[filename] |
@@ -712,6 +710,9 b' if rustmod is not None:' | |||
|
712 | 710 | def set_tracked(self, f): |
|
713 | 711 | return self._map.set_tracked(f) |
|
714 | 712 | |
|
713 | def set_untracked(self, f): | |
|
714 | return self._map.set_untracked(f) | |
|
715 | ||
|
715 | 716 | def set_clean(self, filename, mode, size, mtime): |
|
716 | 717 | self._map.set_clean(filename, mode, size, mtime) |
|
717 | 718 |
General Comments 0
You need to be logged in to leave comments.
Login now