Show More
@@ -558,24 +558,14 b' def synclfdirstate(repo, lfdirstate, lfi' | |||||
558 | if lfstandin not in repo.dirstate: |
|
558 | if lfstandin not in repo.dirstate: | |
559 | lfdirstate.update_file(lfile, p1_tracked=False, wc_tracked=False) |
|
559 | lfdirstate.update_file(lfile, p1_tracked=False, wc_tracked=False) | |
560 | else: |
|
560 | else: | |
561 |
|
|
561 | entry = repo.dirstate.get_entry(lfstandin) | |
562 | state, mtime = stat.state, stat.mtime |
|
562 | lfdirstate.update_file( | |
563 | if state == b'n': |
|
563 | lfile, | |
564 | if normallookup or mtime < 0 or not repo.wvfs.exists(lfile): |
|
564 | wc_tracked=entry.tracked, | |
565 | # state 'n' doesn't ensure 'clean' in this case |
|
565 | p1_tracked=entry.p1_tracked, | |
566 | lfdirstate.update_file( |
|
566 | p2_info=entry.p2_info, | |
567 | lfile, p1_tracked=True, wc_tracked=True, possibly_dirty=True |
|
567 | possibly_dirty=True, | |
568 |
|
|
568 | ) | |
569 | else: |
|
|||
570 | lfdirstate.update_file(lfile, p1_tracked=True, wc_tracked=True) |
|
|||
571 | elif state == b'm': |
|
|||
572 | lfdirstate.update_file( |
|
|||
573 | lfile, p1_tracked=True, wc_tracked=True, merged=True |
|
|||
574 | ) |
|
|||
575 | elif state == b'r': |
|
|||
576 | lfdirstate.update_file(lfile, p1_tracked=True, wc_tracked=False) |
|
|||
577 | elif state == b'a': |
|
|||
578 | lfdirstate.update_file(lfile, p1_tracked=False, wc_tracked=True) |
|
|||
579 |
|
569 | |||
580 |
|
570 | |||
581 | def markcommitted(orig, ctx, node): |
|
571 | def markcommitted(orig, ctx, node): |
@@ -553,10 +553,7 b' class dirstate(object):' | |||||
553 | filename, |
|
553 | filename, | |
554 | wc_tracked, |
|
554 | wc_tracked, | |
555 | p1_tracked, |
|
555 | p1_tracked, | |
556 |
p2_ |
|
556 | p2_info=False, | |
557 | merged=False, |
|
|||
558 | clean_p1=False, |
|
|||
559 | clean_p2=False, |
|
|||
560 | possibly_dirty=False, |
|
557 | possibly_dirty=False, | |
561 | parentfiledata=None, |
|
558 | parentfiledata=None, | |
562 | ): |
|
559 | ): | |
@@ -571,9 +568,6 b' class dirstate(object):' | |||||
571 | depending of what information ends up being relevant and useful to |
|
568 | depending of what information ends up being relevant and useful to | |
572 | other processing. |
|
569 | other processing. | |
573 | """ |
|
570 | """ | |
574 | if merged and (clean_p1 or clean_p2): |
|
|||
575 | msg = b'`merged` argument incompatible with `clean_p1`/`clean_p2`' |
|
|||
576 | raise error.ProgrammingError(msg) |
|
|||
577 |
|
571 | |||
578 | # note: I do not think we need to double check name clash here since we |
|
572 | # note: I do not think we need to double check name clash here since we | |
579 | # are in a update/merge case that should already have taken care of |
|
573 | # are in a update/merge case that should already have taken care of | |
@@ -582,9 +576,7 b' class dirstate(object):' | |||||
582 | self._dirty = True |
|
576 | self._dirty = True | |
583 |
|
577 | |||
584 | need_parent_file_data = ( |
|
578 | need_parent_file_data = ( | |
585 |
not |
|
579 | not possibly_dirty and not p2_info and wc_tracked and p1_tracked | |
586 | and wc_tracked |
|
|||
587 | and p1_tracked |
|
|||
588 | ) |
|
580 | ) | |
589 |
|
581 | |||
590 | # this mean we are doing call for file we do not really care about the |
|
582 | # this mean we are doing call for file we do not really care about the | |
@@ -606,7 +598,7 b' class dirstate(object):' | |||||
606 | filename, |
|
598 | filename, | |
607 | wc_tracked, |
|
599 | wc_tracked, | |
608 | p1_tracked, |
|
600 | p1_tracked, | |
609 |
p2_info= |
|
601 | p2_info=p2_info, | |
610 | has_meaningful_mtime=not possibly_dirty, |
|
602 | has_meaningful_mtime=not possibly_dirty, | |
611 | parentfiledata=parentfiledata, |
|
603 | parentfiledata=parentfiledata, | |
612 | ) |
|
604 | ) |
@@ -801,10 +801,8 b' def recordupdates(repo, actions, branchm' | |||||
801 | repo.dirstate.update_file( |
|
801 | repo.dirstate.update_file( | |
802 | f, |
|
802 | f, | |
803 | p1_tracked=p1_tracked, |
|
803 | p1_tracked=p1_tracked, | |
804 | p2_tracked=True, |
|
|||
805 | wc_tracked=True, |
|
804 | wc_tracked=True, | |
806 |
|
|
805 | p2_info=True, | |
807 | merged=p1_tracked, |
|
|||
808 | ) |
|
806 | ) | |
809 | else: |
|
807 | else: | |
810 | parentfiledata = getfiledata[f] if getfiledata else None |
|
808 | parentfiledata = getfiledata[f] if getfiledata else None | |
@@ -822,14 +820,11 b' def recordupdates(repo, actions, branchm' | |||||
822 | # We've done a branch merge, mark this file as merged |
|
820 | # We've done a branch merge, mark this file as merged | |
823 | # so that we properly record the merger later |
|
821 | # so that we properly record the merger later | |
824 | p1_tracked = f1 == f |
|
822 | p1_tracked = f1 == f | |
825 | p2_tracked = f2 == f |
|
|||
826 | repo.dirstate.update_file( |
|
823 | repo.dirstate.update_file( | |
827 | f, |
|
824 | f, | |
828 | p1_tracked=p1_tracked, |
|
825 | p1_tracked=p1_tracked, | |
829 | p2_tracked=p2_tracked, |
|
|||
830 | wc_tracked=True, |
|
826 | wc_tracked=True, | |
831 | merged=p1_tracked, |
|
827 | p2_info=True, | |
832 | clean_p2=not p1_tracked, |
|
|||
833 | ) |
|
828 | ) | |
834 | if f1 != f2: # copy/rename |
|
829 | if f1 != f2: # copy/rename | |
835 | if move: |
|
830 | if move: |
General Comments 0
You need to be logged in to leave comments.
Login now