##// END OF EJS Templates
merge: collect checking for unknown files at end of manifestmerge()...
Martin von Zweigbergk -
r23651:72da02d7 default
parent child Browse files
Show More
@@ -401,7 +401,6 b' def manifestmerge(repo, wctx, p2, pa, br'
401 m1['.hgsubstate'] += '+'
401 m1['.hgsubstate'] += '+'
402 break
402 break
403
403
404 aborts = []
405 # Compare manifests
404 # Compare manifests
406 diff = m1.diff(m2)
405 diff = m1.diff(m2)
407
406
@@ -488,8 +487,7 b' def manifestmerge(repo, wctx, p2, pa, br'
488 # following table:
487 # following table:
489 #
488 #
490 # force branchmerge different | action
489 # force branchmerge different | action
491 # n * n | create
490 # n * * | create
492 # n * y | abort
493 # y n * | create
491 # y n * | create
494 # y y n | create
492 # y y n | create
495 # y y y | merge
493 # y y y | merge
@@ -497,11 +495,7 b' def manifestmerge(repo, wctx, p2, pa, br'
497 # Checking whether the files are different is expensive, so we
495 # Checking whether the files are different is expensive, so we
498 # don't do that when we can avoid it.
496 # don't do that when we can avoid it.
499 if not force:
497 if not force:
500 different = _checkunknownfile(repo, wctx, p2, f)
498 actions[f] = ('c', (fl2,), "remote created")
501 if different:
502 aborts.append((f, "ud"))
503 else:
504 actions[f] = ('c', (fl2,), "remote created")
505 elif not branchmerge:
499 elif not branchmerge:
506 actions[f] = ('c', (fl2,), "remote created")
500 actions[f] = ('c', (fl2,), "remote created")
507 else:
501 else:
@@ -512,14 +506,17 b' def manifestmerge(repo, wctx, p2, pa, br'
512 else:
506 else:
513 actions[f] = ('g', (fl2,), "remote created")
507 actions[f] = ('g', (fl2,), "remote created")
514 elif n2 != ma[f]:
508 elif n2 != ma[f]:
515 different = _checkunknownfile(repo, wctx, p2, f)
509 if acceptremote:
516 if not force and different:
510 actions[f] = ('c', (fl2,), "remote recreating")
517 aborts.append((f, 'ud'))
518 else:
511 else:
519 if acceptremote:
512 actions[f] = ('dc', (fl2,), "prompt deleted/changed")
520 actions[f] = ('c', (fl2,), "remote recreating")
513
521 else:
514 aborts = []
522 actions[f] = ('dc', (fl2,), "prompt deleted/changed")
515 if not force:
516 for f, (m, args, msg) in actions.iteritems():
517 if m in ('c', 'dc'):
518 if _checkunknownfile(repo, wctx, p2, f):
519 aborts.append((f, "ud"))
523
520
524 for f, m in sorted(aborts):
521 for f, m in sorted(aborts):
525 if m == 'ud':
522 if m == 'ud':
General Comments 0
You need to be logged in to leave comments. Login now