Show More
@@ -414,7 +414,7 b' def manifestmerge(repo, wctx, p2, pa, br' | |||||
414 | for f, ((n1, fl1), (n2, fl2)) in diff.iteritems(): |
|
414 | for f, ((n1, fl1), (n2, fl2)) in diff.iteritems(): | |
415 | if partial and not partial(f): |
|
415 | if partial and not partial(f): | |
416 | continue |
|
416 | continue | |
417 | if n1 and n2: |
|
417 | if n1 and n2: # file exists on both local and remote side | |
418 | if f not in ma: |
|
418 | if f not in ma: | |
419 | fa = copy.get(f, None) |
|
419 | fa = copy.get(f, None) | |
420 | if fa is not None: |
|
420 | if fa is not None: | |
@@ -443,32 +443,35 b' def manifestmerge(repo, wctx, p2, pa, br' | |||||
443 | "versions differ")) |
|
443 | "versions differ")) | |
444 | elif f in copied: # files we'll deal with on m2 side |
|
444 | elif f in copied: # files we'll deal with on m2 side | |
445 | pass |
|
445 | pass | |
446 | elif n1 and f in movewithdir: # directory rename, move local |
|
446 | elif n1: # file exists only on local side | |
|
447 | if f in movewithdir: # directory rename, move local | |||
447 | f2 = movewithdir[f] |
|
448 | f2 = movewithdir[f] | |
448 | actions['dm'].append((f2, (f, fl1), |
|
449 | actions['dm'].append((f2, (f, fl1), | |
449 | "remote directory rename - move from " + f)) |
|
450 | "remote directory rename - move from " + f)) | |
450 |
elif |
|
451 | elif f in copy: | |
451 | f2 = copy[f] |
|
452 | f2 = copy[f] | |
452 | actions['m'].append((f, (f, f2, f2, False, pa.node()), |
|
453 | actions['m'].append((f, (f, f2, f2, False, pa.node()), | |
453 | "local copied/moved from " + f2)) |
|
454 | "local copied/moved from " + f2)) | |
454 |
elif |
|
455 | elif f in ma: # clean, a different, no remote | |
455 | if n1 != ma[f]: |
|
456 | if n1 != ma[f]: | |
456 | if acceptremote: |
|
457 | if acceptremote: | |
457 | actions['r'].append((f, None, "remote delete")) |
|
458 | actions['r'].append((f, None, "remote delete")) | |
458 | else: |
|
459 | else: | |
459 |
actions['cd'].append((f, None, |
|
460 | actions['cd'].append((f, None, | |
|
461 | "prompt changed/deleted")) | |||
460 | elif n1[20:] == 'a': |
|
462 | elif n1[20:] == 'a': | |
461 |
# This extra 'a' is added by working copy manifest to mark |
|
463 | # This extra 'a' is added by working copy manifest to mark | |
462 | # file as locally added. We should forget it instead of |
|
464 | # the file as locally added. We should forget it instead of | |
463 | # deleting it. |
|
465 | # deleting it. | |
464 | actions['f'].append((f, None, "remote deleted")) |
|
466 | actions['f'].append((f, None, "remote deleted")) | |
465 | else: |
|
467 | else: | |
466 | actions['r'].append((f, None, "other deleted")) |
|
468 | actions['r'].append((f, None, "other deleted")) | |
467 |
elif n2 |
|
469 | elif n2: # file exists only on remote side | |
|
470 | if f in movewithdir: | |||
468 | f2 = movewithdir[f] |
|
471 | f2 = movewithdir[f] | |
469 | actions['dg'].append((f2, (f, fl2), |
|
472 | actions['dg'].append((f2, (f, fl2), | |
470 | "local directory rename - get from " + f)) |
|
473 | "local directory rename - get from " + f)) | |
471 |
elif |
|
474 | elif f in copy: | |
472 | f2 = copy[f] |
|
475 | f2 = copy[f] | |
473 | if f2 in m2: |
|
476 | if f2 in m2: | |
474 | actions['m'].append((f, (f2, f, f2, False, pa.node()), |
|
477 | actions['m'].append((f, (f2, f, f2, False, pa.node()), | |
@@ -476,7 +479,7 b' def manifestmerge(repo, wctx, p2, pa, br' | |||||
476 | else: |
|
479 | else: | |
477 | actions['m'].append((f, (f2, f, f2, True, pa.node()), |
|
480 | actions['m'].append((f, (f2, f, f2, True, pa.node()), | |
478 | "remote moved from " + f2)) |
|
481 | "remote moved from " + f2)) | |
479 |
elif |
|
482 | elif f not in ma: | |
480 | # local unknown, remote created: the logic is described by the |
|
483 | # local unknown, remote created: the logic is described by the | |
481 | # following table: |
|
484 | # following table: | |
482 | # |
|
485 | # | |
@@ -500,7 +503,7 b' def manifestmerge(repo, wctx, p2, pa, br' | |||||
500 | aborts.append((f, 'ud')) |
|
503 | aborts.append((f, 'ud')) | |
501 | else: |
|
504 | else: | |
502 | actions['g'].append((f, (fl2,), "remote created")) |
|
505 | actions['g'].append((f, (fl2,), "remote created")) | |
503 |
elif |
|
506 | elif n2 != ma[f]: | |
504 | different = _checkunknownfile(repo, wctx, p2, f) |
|
507 | different = _checkunknownfile(repo, wctx, p2, f) | |
505 | if not force and different: |
|
508 | if not force and different: | |
506 | aborts.append((f, 'ud')) |
|
509 | aborts.append((f, 'ud')) | |
@@ -508,7 +511,8 b' def manifestmerge(repo, wctx, p2, pa, br' | |||||
508 | if acceptremote: |
|
511 | if acceptremote: | |
509 | actions['g'].append((f, (fl2,), "remote recreating")) |
|
512 | actions['g'].append((f, (fl2,), "remote recreating")) | |
510 | else: |
|
513 | else: | |
511 |
actions['dc'].append((f, (fl2,), |
|
514 | actions['dc'].append((f, (fl2,), | |
|
515 | "prompt deleted/changed")) | |||
512 |
|
516 | |||
513 | for f, m in sorted(aborts): |
|
517 | for f, m in sorted(aborts): | |
514 | if m == 'ud': |
|
518 | if m == 'ud': |
General Comments 0
You need to be logged in to leave comments.
Login now