##// END OF EJS Templates
Merge with mpm
Brendan Cully -
r3379:fef022f9 merge default
parent child Browse files
Show More
@@ -87,12 +87,12 b' def forgetremoved(wctx, mctx):'
87
87
88 return action
88 return action
89
89
90 def nonoverlap(d1, d2):
90 def nonoverlap(d1, d2, d3):
91 "Return list of elements in d1 not in d2"
91 "Return list of elements in d1 not in d2 or d3"
92
92
93 l = []
93 l = []
94 for d in d1:
94 for d in d1:
95 if d not in d2:
95 if d not in d3 and d not in d2:
96 l.append(d)
96 l.append(d)
97
97
98 l.sort()
98 l.sort()
@@ -116,12 +116,12 b' def findold(fctx, limit):'
116 old.sort()
116 old.sort()
117 return old
117 return old
118
118
119 def findcopies(repo, m1, m2, limit):
119 def findcopies(repo, m1, m2, ma, limit):
120 """
120 """
121 Find moves and copies between m1 and m2 back to limit linkrev
121 Find moves and copies between m1 and m2 back to limit linkrev
122 """
122 """
123
123
124 if not repo.ui.config("merge", "followcopies"):
124 if not repo.ui.configbool("merge", "followcopies", True):
125 return {}
125 return {}
126
126
127 # avoid silly behavior for update from empty dir
127 # avoid silly behavior for update from empty dir
@@ -131,8 +131,8 b' def findcopies(repo, m1, m2, limit):'
131 dcopies = repo.dirstate.copies()
131 dcopies = repo.dirstate.copies()
132 copy = {}
132 copy = {}
133 match = {}
133 match = {}
134 u1 = nonoverlap(m1, m2)
134 u1 = nonoverlap(m1, m2, ma)
135 u2 = nonoverlap(m2, m1)
135 u2 = nonoverlap(m2, m1, ma)
136 ctx = util.cachefunc(lambda f,n: repo.filectx(f, fileid=n[:20]))
136 ctx = util.cachefunc(lambda f,n: repo.filectx(f, fileid=n[:20]))
137
137
138 def checkpair(c, f2, man):
138 def checkpair(c, f2, man):
@@ -194,7 +194,7 b' def manifestmerge(repo, p1, p2, pa, over'
194 action.append((f, m) + args)
194 action.append((f, m) + args)
195
195
196 if not (backwards or overwrite):
196 if not (backwards or overwrite):
197 copy = findcopies(repo, m1, m2, pa.rev())
197 copy = findcopies(repo, m1, m2, ma, pa.rev())
198
198
199 # Compare manifests
199 # Compare manifests
200 for f, n in m1.iteritems():
200 for f, n in m1.iteritems():
General Comments 0
You need to be logged in to leave comments. Login now