Show More
@@ -886,6 +886,7 b' class localrepository:' | |||||
886 | return |
|
886 | return | |
887 |
|
887 | |||
888 | p1, p2 = pl[0], node |
|
888 | p1, p2 = pl[0], node | |
|
889 | pa = self.changelog.ancestor(p1, p2) | |||
889 | m1n = self.changelog.read(p1)[0] |
|
890 | m1n = self.changelog.read(p1)[0] | |
890 | m2n = self.changelog.read(p2)[0] |
|
891 | m2n = self.changelog.read(p2)[0] | |
891 | man = self.manifest.ancestor(m1n, m2n) |
|
892 | man = self.manifest.ancestor(m1n, m2n) | |
@@ -907,6 +908,7 b' class localrepository:' | |||||
907 | merge = {} |
|
908 | merge = {} | |
908 | get = {} |
|
909 | get = {} | |
909 | remove = [] |
|
910 | remove = [] | |
|
911 | mark = {} | |||
910 |
|
912 | |||
911 | # construct a working dir manifest |
|
913 | # construct a working dir manifest | |
912 | mw = m1.copy() |
|
914 | mw = m1.copy() | |
@@ -934,11 +936,15 b' class localrepository:' | |||||
934 | mode = ((a^b) | (a^c)) ^ a |
|
936 | mode = ((a^b) | (a^c)) ^ a | |
935 | merge[f] = (m1.get(f, nullid), m2[f], mode) |
|
937 | merge[f] = (m1.get(f, nullid), m2[f], mode) | |
936 | s = 1 |
|
938 | s = 1 | |
937 |
# |
|
939 | # are we clobbering? | |
938 | elif mw[f] == m1[f] or force: |
|
940 | # is remote's version newer? | |
|
941 | # or are we going back in time? | |||
|
942 | elif force or m2[f] != a or (p2 == pa and mw[f] == m1[f]): | |||
939 | self.ui.debug(" remote %s is newer, get\n" % f) |
|
943 | self.ui.debug(" remote %s is newer, get\n" % f) | |
940 | get[f] = m2[f] |
|
944 | get[f] = m2[f] | |
941 | s = 1 |
|
945 | s = 1 | |
|
946 | else: | |||
|
947 | mark[f] = 1 | |||
942 |
|
948 | |||
943 | if not s and mfw[f] != mf2[f]: |
|
949 | if not s and mfw[f] != mf2[f]: | |
944 | if force: |
|
950 | if force: | |
@@ -950,7 +956,7 b' class localrepository:' | |||||
950 | if mode != b: |
|
956 | if mode != b: | |
951 | self.ui.debug(" updating permissions for %s\n" % f) |
|
957 | self.ui.debug(" updating permissions for %s\n" % f) | |
952 | set_exec(self.wjoin(f), mode) |
|
958 | set_exec(self.wjoin(f), mode) | |
953 |
|
959 | mark[f] = 1 | ||
954 | del m2[f] |
|
960 | del m2[f] | |
955 | elif f in ma: |
|
961 | elif f in ma: | |
956 | if not force and n != ma[f]: |
|
962 | if not force and n != ma[f]: | |
@@ -987,22 +993,28 b' class localrepository:' | |||||
987 | get[f] = merge[f][1] |
|
993 | get[f] = merge[f][1] | |
988 | merge = {} |
|
994 | merge = {} | |
989 |
|
995 | |||
990 | if not merge: |
|
996 | if pa == p1 or pa == p2: | |
991 | # we don't need to do any magic, just jump to the new rev |
|
997 | # we don't need to do any magic, just jump to the new rev | |
992 | mode = 'n' |
|
998 | mode = 'n' | |
993 | p1, p2 = p2, nullid |
|
999 | p1, p2 = p2, nullid | |
994 | else: |
|
1000 | else: | |
995 | if not allow: |
|
1001 | if not allow: | |
996 |
self.ui.status("th |
|
1002 | self.ui.status("this update spans a branch" + | |
997 | for f in merge: |
|
1003 | " affecting the following files:\n") | |
998 | self.ui.status(" %s\n" % f) |
|
1004 | fl = merge.keys() + get.keys() | |
999 | self.ui.warn("aborting update due to conflicting files!\n") |
|
1005 | fl.sort() | |
1000 | self.ui.status("(use update -m to allow a merge)\n") |
|
1006 | for f in fl: | |
|
1007 | cf = "" | |||
|
1008 | if f in merge: cf = " (resolve)" | |||
|
1009 | self.ui.status(" %s%s\n" % (f, cf)) | |||
|
1010 | self.ui.warn("aborting update spanning branches!\n") | |||
|
1011 | self.ui.status("(use update -m to perform a branch merge)\n") | |||
1001 | return 1 |
|
1012 | return 1 | |
1002 | # we have to remember what files we needed to get/change |
|
1013 | # we have to remember what files we needed to get/change | |
1003 | # because any file that's different from either one of its |
|
1014 | # because any file that's different from either one of its | |
1004 | # parents must be in the changeset |
|
1015 | # parents must be in the changeset | |
1005 | mode = 'm' |
|
1016 | mode = 'm' | |
|
1017 | self.dirstate.update(mark.keys(), "m") | |||
1006 |
|
1018 | |||
1007 | self.dirstate.setparents(p1, p2) |
|
1019 | self.dirstate.setparents(p1, p2) | |
1008 |
|
1020 |
General Comments 0
You need to be logged in to leave comments.
Login now