Show More
@@ -238,7 +238,7 b' def manifestmerge(repo, wctx, p2, pa, br' | |||||
238 |
|
238 | |||
239 | aborts, prompts = [], [] |
|
239 | aborts, prompts = [], [] | |
240 | # Compare manifests |
|
240 | # Compare manifests | |
241 | for f, n in m1.iteritems(): |
|
241 | for f, n1 in m1.iteritems(): | |
242 | if partial and not partial(f): |
|
242 | if partial and not partial(f): | |
243 | continue |
|
243 | continue | |
244 | if f in m2: |
|
244 | if f in m2: | |
@@ -246,18 +246,18 b' def manifestmerge(repo, wctx, p2, pa, br' | |||||
246 | fl1, fl2, fla = m1.flags(f), m2.flags(f), ma.flags(f) |
|
246 | fl1, fl2, fla = m1.flags(f), m2.flags(f), ma.flags(f) | |
247 | nol = 'l' not in fl1 + fl2 + fla |
|
247 | nol = 'l' not in fl1 + fl2 + fla | |
248 | a = ma.get(f, nullid) |
|
248 | a = ma.get(f, nullid) | |
249 | if n == n2 and fl1 == fl2: |
|
249 | if n1 == n2 and fl1 == fl2: | |
250 | pass # same - keep local |
|
250 | pass # same - keep local | |
251 | elif n2 == a and fl2 == fla: |
|
251 | elif n2 == a and fl2 == fla: | |
252 | pass # remote unchanged - keep local |
|
252 | pass # remote unchanged - keep local | |
253 | elif n == a and fl1 == fla: # local unchanged - use remote |
|
253 | elif n1 == a and fl1 == fla: # local unchanged - use remote | |
254 | if n == n2: # optimization: keep local content |
|
254 | if n1 == n2: # optimization: keep local content | |
255 | actions.append((f, "e", (fl2,), "update permissions")) |
|
255 | actions.append((f, "e", (fl2,), "update permissions")) | |
256 | else: |
|
256 | else: | |
257 | actions.append((f, "g", (fl2,), "remote is newer")) |
|
257 | actions.append((f, "g", (fl2,), "remote is newer")) | |
258 | elif nol and n2 == a: # remote only changed 'x' |
|
258 | elif nol and n2 == a: # remote only changed 'x' | |
259 | actions.append((f, "e", (fl2,), "update permissions")) |
|
259 | actions.append((f, "e", (fl2,), "update permissions")) | |
260 | elif nol and n == a: # local only changed 'x' |
|
260 | elif nol and n1 == a: # local only changed 'x' | |
261 | actions.append((f, "g", (fl1,), "remote is newer")) |
|
261 | actions.append((f, "g", (fl1,), "remote is newer")) | |
262 | else: # both changed something |
|
262 | else: # both changed something | |
263 | actions.append((f, "m", (f, f, False), "versions differ")) |
|
263 | actions.append((f, "m", (f, f, False), "versions differ")) | |
@@ -272,14 +272,14 b' def manifestmerge(repo, wctx, p2, pa, br' | |||||
272 | actions.append((f, "m", (f2, f, False), |
|
272 | actions.append((f, "m", (f2, f, False), | |
273 | "local copied/moved to " + f2)) |
|
273 | "local copied/moved to " + f2)) | |
274 | elif f in ma: # clean, a different, no remote |
|
274 | elif f in ma: # clean, a different, no remote | |
275 | if n != ma[f]: |
|
275 | if n1 != ma[f]: | |
276 | prompts.append((f, "cd")) # prompt changed/deleted |
|
276 | prompts.append((f, "cd")) # prompt changed/deleted | |
277 | elif n[20:] == "a": # added, no remote |
|
277 | elif n1[20:] == "a": # added, no remote | |
278 | actions.append((f, "f", None, "remote deleted")) |
|
278 | actions.append((f, "f", None, "remote deleted")) | |
279 | else: |
|
279 | else: | |
280 | actions.append((f, "r", None, "other deleted")) |
|
280 | actions.append((f, "r", None, "other deleted")) | |
281 |
|
281 | |||
282 | for f, n in m2.iteritems(): |
|
282 | for f, n2 in m2.iteritems(): | |
283 | if partial and not partial(f): |
|
283 | if partial and not partial(f): | |
284 | continue |
|
284 | continue | |
285 | if f in m1 or f in copied: # files already visited |
|
285 | if f in m1 or f in copied: # files already visited | |
@@ -320,7 +320,7 b' def manifestmerge(repo, wctx, p2, pa, br' | |||||
320 | aborts.append((f, "ud")) |
|
320 | aborts.append((f, "ud")) | |
321 | else: |
|
321 | else: | |
322 | actions.append((f, "g", (m2.flags(f),), "remote created")) |
|
322 | actions.append((f, "g", (m2.flags(f),), "remote created")) | |
323 | elif n != ma[f]: |
|
323 | elif n2 != ma[f]: | |
324 | prompts.append((f, "dc")) # prompt deleted/changed |
|
324 | prompts.append((f, "dc")) # prompt deleted/changed | |
325 |
|
325 | |||
326 | for f, m in sorted(aborts): |
|
326 | for f, m in sorted(aborts): |
General Comments 0
You need to be logged in to leave comments.
Login now