Show More
@@ -743,34 +743,34 b' def recordupdates(repo, actions, branchm' | |||||
743 | # remove (must come first) |
|
743 | # remove (must come first) | |
744 | for f, args, msg in actions.get(ACTION_REMOVE, []): |
|
744 | for f, args, msg in actions.get(ACTION_REMOVE, []): | |
745 | if branchmerge: |
|
745 | if branchmerge: | |
746 | repo.dirstate.remove(f) |
|
746 | repo.dirstate.update_file(f, p1_tracked=True, wc_tracked=False) | |
747 | else: |
|
747 | else: | |
748 | repo.dirstate.drop(f) |
|
748 | repo.dirstate.update_file(f, p1_tracked=False, wc_tracked=False) | |
749 |
|
749 | |||
750 | # forget (must come first) |
|
750 | # forget (must come first) | |
751 | for f, args, msg in actions.get(ACTION_FORGET, []): |
|
751 | for f, args, msg in actions.get(ACTION_FORGET, []): | |
752 | repo.dirstate.drop(f) |
|
752 | repo.dirstate.update_file(f, p1_tracked=False, wc_tracked=False) | |
753 |
|
753 | |||
754 | # resolve path conflicts |
|
754 | # resolve path conflicts | |
755 | for f, args, msg in actions.get(ACTION_PATH_CONFLICT_RESOLVE, []): |
|
755 | for f, args, msg in actions.get(ACTION_PATH_CONFLICT_RESOLVE, []): | |
756 | (f0, origf0) = args |
|
756 | (f0, origf0) = args | |
757 | repo.dirstate.add(f) |
|
757 | repo.dirstate.update_file(f, p1_tracked=False, wc_tracked=True) | |
758 | repo.dirstate.copy(origf0, f) |
|
758 | repo.dirstate.copy(origf0, f) | |
759 | if f0 == origf0: |
|
759 | if f0 == origf0: | |
760 | repo.dirstate.remove(f0) |
|
760 | repo.dirstate.update_file(f0, p1_tracked=True, wc_tracked=False) | |
761 | else: |
|
761 | else: | |
762 | repo.dirstate.drop(f0) |
|
762 | repo.dirstate.update_file(f0, p1_tracked=False, wc_tracked=False) | |
763 |
|
763 | |||
764 | # re-add |
|
764 | # re-add | |
765 | for f, args, msg in actions.get(ACTION_ADD, []): |
|
765 | for f, args, msg in actions.get(ACTION_ADD, []): | |
766 | repo.dirstate.add(f) |
|
766 | repo.dirstate.update_file(f, p1_tracked=False, wc_tracked=True) | |
767 |
|
767 | |||
768 | # re-add/mark as modified |
|
768 | # re-add/mark as modified | |
769 | for f, args, msg in actions.get(ACTION_ADD_MODIFIED, []): |
|
769 | for f, args, msg in actions.get(ACTION_ADD_MODIFIED, []): | |
770 | if branchmerge: |
|
770 | if branchmerge: | |
771 | repo.dirstate.normallookup(f) |
|
771 | repo.dirstate.normallookup(f) | |
772 | else: |
|
772 | else: | |
773 | repo.dirstate.add(f) |
|
773 | repo.dirstate.update_file(f, p1_tracked=False, wc_tracked=True) | |
774 |
|
774 | |||
775 | # exec change |
|
775 | # exec change | |
776 | for f, args, msg in actions.get(ACTION_EXEC, []): |
|
776 | for f, args, msg in actions.get(ACTION_EXEC, []): | |
@@ -791,10 +791,17 b' def recordupdates(repo, actions, branchm' | |||||
791 | # get |
|
791 | # get | |
792 | for f, args, msg in actions.get(ACTION_GET, []): |
|
792 | for f, args, msg in actions.get(ACTION_GET, []): | |
793 | if branchmerge: |
|
793 | if branchmerge: | |
794 | repo.dirstate.otherparent(f) |
|
794 | # tracked in p1 can be True also but update_file should not care | |
|
795 | repo.dirstate.update_file( | |||
|
796 | f, | |||
|
797 | p1_tracked=False, | |||
|
798 | p2_tracked=True, | |||
|
799 | wc_tracked=True, | |||
|
800 | clean_p2=True, | |||
|
801 | ) | |||
795 | else: |
|
802 | else: | |
796 | parentfiledata = getfiledata[f] if getfiledata else None |
|
803 | parentfiledata = getfiledata[f] if getfiledata else None | |
797 |
repo.dirstate. |
|
804 | repo.dirstate.update_parent_file_data(f, parentfiledata) | |
798 |
|
805 | |||
799 | # merge |
|
806 | # merge | |
800 | for f, args, msg in actions.get(ACTION_MERGE, []): |
|
807 | for f, args, msg in actions.get(ACTION_MERGE, []): | |
@@ -802,10 +809,14 b' def recordupdates(repo, actions, branchm' | |||||
802 | if branchmerge: |
|
809 | if branchmerge: | |
803 | # We've done a branch merge, mark this file as merged |
|
810 | # We've done a branch merge, mark this file as merged | |
804 | # so that we properly record the merger later |
|
811 | # so that we properly record the merger later | |
805 |
repo.dirstate. |
|
812 | repo.dirstate.update_file( | |
|
813 | f, p1_tracked=True, wc_tracked=True, merged=True | |||
|
814 | ) | |||
806 | if f1 != f2: # copy/rename |
|
815 | if f1 != f2: # copy/rename | |
807 | if move: |
|
816 | if move: | |
808 |
repo.dirstate. |
|
817 | repo.dirstate.update_file( | |
|
818 | f1, p1_tracked=True, wc_tracked=False | |||
|
819 | ) | |||
809 | if f1 != f: |
|
820 | if f1 != f: | |
810 | repo.dirstate.copy(f1, f) |
|
821 | repo.dirstate.copy(f1, f) | |
811 | else: |
|
822 | else: | |
@@ -817,26 +828,30 b' def recordupdates(repo, actions, branchm' | |||||
817 | # merge will appear as a normal local file |
|
828 | # merge will appear as a normal local file | |
818 | # modification. |
|
829 | # modification. | |
819 | if f2 == f: # file not locally copied/moved |
|
830 | if f2 == f: # file not locally copied/moved | |
820 |
repo.dirstate. |
|
831 | repo.dirstate.update_file( | |
|
832 | f, p1_tracked=True, wc_tracked=True, possibly_dirty=True | |||
|
833 | ) | |||
821 | if move: |
|
834 | if move: | |
822 |
repo.dirstate. |
|
835 | repo.dirstate.update_file( | |
|
836 | f1, p1_tracked=False, wc_tracked=False | |||
|
837 | ) | |||
823 |
|
838 | |||
824 | # directory rename, move local |
|
839 | # directory rename, move local | |
825 | for f, args, msg in actions.get(ACTION_DIR_RENAME_MOVE_LOCAL, []): |
|
840 | for f, args, msg in actions.get(ACTION_DIR_RENAME_MOVE_LOCAL, []): | |
826 | f0, flag = args |
|
841 | f0, flag = args | |
827 | if branchmerge: |
|
842 | if branchmerge: | |
828 | repo.dirstate.add(f) |
|
843 | repo.dirstate.update_file(f, p1_tracked=False, wc_tracked=True) | |
829 | repo.dirstate.remove(f0) |
|
844 | repo.dirstate.update_file(f0, p1_tracked=True, wc_tracked=False) | |
830 | repo.dirstate.copy(f0, f) |
|
845 | repo.dirstate.copy(f0, f) | |
831 | else: |
|
846 | else: | |
832 | repo.dirstate.normal(f) |
|
847 | repo.dirstate.update_file(f, p1_tracked=True, wc_tracked=True) | |
833 | repo.dirstate.drop(f0) |
|
848 | repo.dirstate.update_file(f0, p1_tracked=False, wc_tracked=False) | |
834 |
|
849 | |||
835 | # directory rename, get |
|
850 | # directory rename, get | |
836 | for f, args, msg in actions.get(ACTION_LOCAL_DIR_RENAME_GET, []): |
|
851 | for f, args, msg in actions.get(ACTION_LOCAL_DIR_RENAME_GET, []): | |
837 | f0, flag = args |
|
852 | f0, flag = args | |
838 | if branchmerge: |
|
853 | if branchmerge: | |
839 | repo.dirstate.add(f) |
|
854 | repo.dirstate.update_file(f, p1_tracked=False, wc_tracked=True) | |
840 | repo.dirstate.copy(f0, f) |
|
855 | repo.dirstate.copy(f0, f) | |
841 | else: |
|
856 | else: | |
842 | repo.dirstate.normal(f) |
|
857 | repo.dirstate.update_file(f, p1_tracked=True, wc_tracked=True) |
General Comments 0
You need to be logged in to leave comments.
Login now