Show More
@@ -516,12 +516,7 b' class dirstate(object):' | |||
|
516 | 516 | wc_tracked = False |
|
517 | 517 | else: |
|
518 | 518 | wc_tracked = entry.tracked |
|
519 | possibly_dirty = False | |
|
520 | if p1_tracked and wc_tracked: | |
|
521 | # the underlying reference might have changed, we will have to | |
|
522 | # check it. | |
|
523 | possibly_dirty = True | |
|
524 | elif not (p1_tracked or wc_tracked): | |
|
519 | if not (p1_tracked or wc_tracked): | |
|
525 | 520 | # the file is no longer relevant to anyone |
|
526 | 521 | if self._map.get(filename) is not None: |
|
527 | 522 | self._map.reset_state(filename) |
@@ -529,10 +524,6 b' class dirstate(object):' | |||
|
529 | 524 | elif (not p1_tracked) and wc_tracked: |
|
530 | 525 | if entry is not None and entry.added: |
|
531 | 526 | return # avoid dropping copy information (maybe?) |
|
532 | elif p1_tracked and not wc_tracked: | |
|
533 | pass | |
|
534 | else: | |
|
535 | assert False, 'unreachable' | |
|
536 | 527 | |
|
537 | 528 | # this mean we are doing call for file we do not really care about the |
|
538 | 529 | # data (eg: added or removed), however this should be a minor overhead |
@@ -545,7 +536,9 b' class dirstate(object):' | |||
|
545 | 536 | filename, |
|
546 | 537 | wc_tracked, |
|
547 | 538 | p1_tracked, |
|
548 | possibly_dirty=possibly_dirty, | |
|
539 | # the underlying reference might have changed, we will have to | |
|
540 | # check it. | |
|
541 | has_meaningful_mtime=False, | |
|
549 | 542 | parentfiledata=parentfiledata, |
|
550 | 543 | ) |
|
551 | 544 | if ( |
@@ -616,11 +609,8 b' class dirstate(object):' | |||
|
616 | 609 | filename, |
|
617 | 610 | wc_tracked, |
|
618 | 611 | p1_tracked, |
|
619 | p2_tracked=p2_tracked, | |
|
620 | merged=merged, | |
|
621 | clean_p1=clean_p1, | |
|
622 | clean_p2=clean_p2, | |
|
623 | possibly_dirty=possibly_dirty, | |
|
612 | p2_info=merged or clean_p2, | |
|
613 | has_meaningful_mtime=not possibly_dirty, | |
|
624 | 614 | parentfiledata=parentfiledata, |
|
625 | 615 | ) |
|
626 | 616 | if ( |
@@ -773,7 +763,6 b' class dirstate(object):' | |||
|
773 | 763 | f, |
|
774 | 764 | wc_tracked=True, |
|
775 | 765 | p1_tracked=True, |
|
776 | possibly_dirty=True, | |
|
777 | 766 | ) |
|
778 | 767 | for f in to_drop: |
|
779 | 768 | self._map.reset_state(f) |
@@ -173,11 +173,9 b' class _dirstatemapcommon(object):' | |||
|
173 | 173 | filename, |
|
174 | 174 | wc_tracked=False, |
|
175 | 175 | p1_tracked=False, |
|
176 |
p2_ |
|
|
177 | merged=False, | |
|
178 | clean_p1=False, | |
|
179 | clean_p2=False, | |
|
180 | possibly_dirty=False, | |
|
176 | p2_info=False, | |
|
177 | has_meaningful_mtime=True, | |
|
178 | has_meaningful_data=True, | |
|
181 | 179 | parentfiledata=None, |
|
182 | 180 | ): |
|
183 | 181 | """Set a entry to a given state, diregarding all previous state |
@@ -189,25 +187,16 b' class _dirstatemapcommon(object):' | |||
|
189 | 187 | dirstate map does not see any point at having one for this file |
|
190 | 188 | anymore. |
|
191 | 189 | """ |
|
192 | if merged and (clean_p1 or clean_p2): | |
|
193 | msg = b'`merged` argument incompatible with `clean_p1`/`clean_p2`' | |
|
194 | raise error.ProgrammingError(msg) | |
|
195 | 190 | # copy information are now outdated |
|
196 | 191 | # (maybe new information should be in directly passed to this function) |
|
197 | 192 | self.copymap.pop(filename, None) |
|
198 | 193 | |
|
199 |
if not (p1_tracked or p2_ |
|
|
194 | if not (p1_tracked or p2_info or wc_tracked): | |
|
200 | 195 | old_entry = self._map.get(filename) |
|
201 | 196 | self._drop_entry(filename) |
|
202 | 197 | self._dirs_decr(filename, old_entry=old_entry) |
|
203 | 198 | return |
|
204 | 199 | |
|
205 | p2_info = merged or clean_p2 | |
|
206 | if merged: | |
|
207 | assert p1_tracked | |
|
208 | ||
|
209 | has_meaningful_mtime = not possibly_dirty | |
|
210 | ||
|
211 | 200 | old_entry = self._map.get(filename) |
|
212 | 201 | self._dirs_incr(filename, old_entry) |
|
213 | 202 | entry = DirstateItem( |
General Comments 0
You need to be logged in to leave comments.
Login now