##// END OF EJS Templates
merge: add copied hash to simplify copy logic
Matt Mackall -
r3729:581d2077 default
parent child Browse files
Show More
@@ -176,6 +176,7 b' def manifestmerge(repo, p1, p2, pa, over'
176 backwards = (pa == p2)
176 backwards = (pa == p2)
177 action = []
177 action = []
178 copy = {}
178 copy = {}
179 copied = {}
179
180
180 def fmerge(f, f2=None, fa=None):
181 def fmerge(f, f2=None, fa=None):
181 """merge executable flags"""
182 """merge executable flags"""
@@ -217,6 +218,7 b' def manifestmerge(repo, p1, p2, pa, over'
217 act("update permissions", "e", f, m2.execf(f))
218 act("update permissions", "e", f, m2.execf(f))
218 elif f in copy:
219 elif f in copy:
219 f2 = copy[f]
220 f2 = copy[f]
221 copied[f2] = True
220 if f in ma: # case 3,20 A/B/A
222 if f in ma: # case 3,20 A/B/A
221 act("remote moved to " + f2, "m",
223 act("remote moved to " + f2, "m",
222 f, f2, f2, fmerge(f, f2, f), True)
224 f, f2, f2, fmerge(f, f2, f), True)
@@ -245,10 +247,10 b' def manifestmerge(repo, p1, p2, pa, over'
245 continue
247 continue
246 if f in m1:
248 if f in m1:
247 continue
249 continue
250 if f in copied:
251 continue
248 if f in copy:
252 if f in copy:
249 f2 = copy[f]
253 f2 = copy[f]
250 if f2 not in m2: # already seen
251 continue
252 # rename case 1, A/A,B/A
254 # rename case 1, A/A,B/A
253 act("remote copied to " + f, "m",
255 act("remote copied to " + f, "m",
254 f2, f, f, fmerge(f2, f, f2), False)
256 f2, f, f, fmerge(f2, f, f2), False)
General Comments 0
You need to be logged in to leave comments. Login now