##// END OF EJS Templates
copies: when both sides made the same copy, report it as a copy...
Mads Kiilerich -
r20641:3db9e798 default
parent child Browse files
Show More
@@ -262,6 +262,18 b' def mergecopies(repo, c1, c2, ca):'
262 else:
262 else:
263 diverge2.update(fl) # reverse map for below
263 diverge2.update(fl) # reverse map for below
264
264
265 bothnew = sorted([d for d in m1 if d in m2 and d not in ma])
266 if bothnew:
267 repo.ui.debug(" unmatched files new in both:\n %s\n"
268 % "\n ".join(bothnew))
269 bothdiverge, _copy, _fullcopy = {}, {}, {}
270 for f in bothnew:
271 checkcopies(ctx, f, m1, m2, ca, limit, bothdiverge, _copy, _fullcopy)
272 checkcopies(ctx, f, m2, m1, ca, limit, bothdiverge, _copy, _fullcopy)
273 for of, fl in bothdiverge.items():
274 if len(fl) == 2 and fl[0] == fl[1]:
275 copy[fl[0]] = of # not actually divergent, just matching renames
276
265 if fullcopy:
277 if fullcopy:
266 repo.ui.debug(" all copies found (* = to merge, ! = divergent, "
278 repo.ui.debug(" all copies found (* = to merge, ! = divergent, "
267 "% = renamed and deleted):\n")
279 "% = renamed and deleted):\n")
@@ -335,6 +335,8 b' args:'
335 test L:um a b R:um a b W: - 9 do merge with ancestor in a
335 test L:um a b R:um a b W: - 9 do merge with ancestor in a
336 --------------
336 --------------
337 searching for copies back to rev 1
337 searching for copies back to rev 1
338 unmatched files new in both:
339 b
338 resolving manifests
340 resolving manifests
339 branchmerge: True, force: False, partial: False
341 branchmerge: True, force: False, partial: False
340 ancestor: 924404dff337, local: 62e7bf090eba+, remote: 49b6d8032493
342 ancestor: 924404dff337, local: 62e7bf090eba+, remote: 49b6d8032493
@@ -403,6 +405,8 b' m "um a c" "um x c" " " "10 do merg'
403 test L:nc a b R:up b W: - 12 merge b no ancestor
405 test L:nc a b R:up b W: - 12 merge b no ancestor
404 --------------
406 --------------
405 searching for copies back to rev 1
407 searching for copies back to rev 1
408 unmatched files new in both:
409 b
406 resolving manifests
410 resolving manifests
407 branchmerge: True, force: False, partial: False
411 branchmerge: True, force: False, partial: False
408 ancestor: 924404dff337, local: 86a2aa42fc76+, remote: af30c7647fc7
412 ancestor: 924404dff337, local: 86a2aa42fc76+, remote: af30c7647fc7
@@ -431,6 +435,8 b' m "um a c" "um x c" " " "10 do merg'
431 test L:up b R:nm a b W: - 13 merge b no ancestor
435 test L:up b R:nm a b W: - 13 merge b no ancestor
432 --------------
436 --------------
433 searching for copies back to rev 1
437 searching for copies back to rev 1
438 unmatched files new in both:
439 b
434 resolving manifests
440 resolving manifests
435 branchmerge: True, force: False, partial: False
441 branchmerge: True, force: False, partial: False
436 ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a
442 ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a
@@ -461,6 +467,8 b' m "um a c" "um x c" " " "10 do merg'
461 test L:nc a b R:up a b W: - 14 merge b no ancestor
467 test L:nc a b R:up a b W: - 14 merge b no ancestor
462 --------------
468 --------------
463 searching for copies back to rev 1
469 searching for copies back to rev 1
470 unmatched files new in both:
471 b
464 resolving manifests
472 resolving manifests
465 branchmerge: True, force: False, partial: False
473 branchmerge: True, force: False, partial: False
466 ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a
474 ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a
@@ -492,6 +500,8 b' m "um a c" "um x c" " " "10 do merg'
492 test L:up b R:nm a b W: - 15 merge b no ancestor, remove a
500 test L:up b R:nm a b W: - 15 merge b no ancestor, remove a
493 --------------
501 --------------
494 searching for copies back to rev 1
502 searching for copies back to rev 1
503 unmatched files new in both:
504 b
495 resolving manifests
505 resolving manifests
496 branchmerge: True, force: False, partial: False
506 branchmerge: True, force: False, partial: False
497 ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a
507 ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a
@@ -522,6 +532,8 b' m "um a c" "um x c" " " "10 do merg'
522 test L:nc a b R:up a b W: - 16 get a, merge b no ancestor
532 test L:nc a b R:up a b W: - 16 get a, merge b no ancestor
523 --------------
533 --------------
524 searching for copies back to rev 1
534 searching for copies back to rev 1
535 unmatched files new in both:
536 b
525 resolving manifests
537 resolving manifests
526 branchmerge: True, force: False, partial: False
538 branchmerge: True, force: False, partial: False
527 ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a
539 ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a
@@ -553,6 +565,8 b' m "um a c" "um x c" " " "10 do merg'
553 test L:up a b R:nc a b W: - 17 keep a, merge b no ancestor
565 test L:up a b R:nc a b W: - 17 keep a, merge b no ancestor
554 --------------
566 --------------
555 searching for copies back to rev 1
567 searching for copies back to rev 1
568 unmatched files new in both:
569 b
556 resolving manifests
570 resolving manifests
557 branchmerge: True, force: False, partial: False
571 branchmerge: True, force: False, partial: False
558 ancestor: 924404dff337, local: 0b76e65c8289+, remote: 4ce40f5aca24
572 ancestor: 924404dff337, local: 0b76e65c8289+, remote: 4ce40f5aca24
@@ -581,6 +595,8 b' m "um a c" "um x c" " " "10 do merg'
581 test L:nm a b R:up a b W: - 18 merge b no ancestor
595 test L:nm a b R:up a b W: - 18 merge b no ancestor
582 --------------
596 --------------
583 searching for copies back to rev 1
597 searching for copies back to rev 1
598 unmatched files new in both:
599 b
584 resolving manifests
600 resolving manifests
585 branchmerge: True, force: False, partial: False
601 branchmerge: True, force: False, partial: False
586 ancestor: 924404dff337, local: 02963e448370+, remote: 8dbce441892a
602 ancestor: 924404dff337, local: 02963e448370+, remote: 8dbce441892a
@@ -614,6 +630,8 b' m "um a c" "um x c" " " "10 do merg'
614 test L:up a b R:nm a b W: - 19 merge b no ancestor, prompt remove a
630 test L:up a b R:nm a b W: - 19 merge b no ancestor, prompt remove a
615 --------------
631 --------------
616 searching for copies back to rev 1
632 searching for copies back to rev 1
633 unmatched files new in both:
634 b
617 resolving manifests
635 resolving manifests
618 branchmerge: True, force: False, partial: False
636 branchmerge: True, force: False, partial: False
619 ancestor: 924404dff337, local: 0b76e65c8289+, remote: bdb19105162a
637 ancestor: 924404dff337, local: 0b76e65c8289+, remote: bdb19105162a
@@ -802,6 +820,9 b' 8 f (f) f f "remote differs from '
802 3/g
820 3/g
803 4/g
821 4/g
804 7/f
822 7/f
823 unmatched files new in both:
824 0/f
825 1/g
805 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
826 all copies found (* = to merge, ! = divergent, % = renamed and deleted):
806 src: '3/f' -> dst: '3/g' *
827 src: '3/f' -> dst: '3/g' *
807 src: '4/f' -> dst: '4/g' *
828 src: '4/f' -> dst: '4/g' *
@@ -176,6 +176,8 b' create a second head'
176 [255]
176 [255]
177 $ hg --debug merge -f
177 $ hg --debug merge -f
178 searching for copies back to rev 1
178 searching for copies back to rev 1
179 unmatched files new in both:
180 b
179 resolving manifests
181 resolving manifests
180 branchmerge: True, force: True, partial: False
182 branchmerge: True, force: True, partial: False
181 ancestor: c19d34741b0a, local: 1e71731e6fbb+, remote: 83c51d0caff4
183 ancestor: c19d34741b0a, local: 1e71731e6fbb+, remote: 83c51d0caff4
General Comments 0
You need to be logged in to leave comments. Login now