Mercurial > hg
comparison tests/test-graft.t @ 30188:8a864844d5a0
checkcopies: add a sanity check against false-positive copies
When grafting a copy backwards through a rename, a copy is wrongly detected,
which causes the graft to be applied inappropriately, in a destructive way.
Make sure that the old file name really exists in the common ancestor,
and bail out if it doesn't.
This fixes the aggravated case of bug 5343, although the basic issue
(failure to duplicate the copy information) still occurs.
author | Gábor Stefanik <gabor.stefanik@nng.com> |
---|---|
date | Wed, 12 Oct 2016 21:33:45 +0200 |
parents | c15f06109b7a |
children | 509d29255c04 |
comparison
equal
deleted
inserted
replaced
30187:3e86261bf110 | 30188:8a864844d5a0 |
---|---|
425 | 425 |
426 $ hg up -Cq 1 | 426 $ hg up -Cq 1 |
427 $ hg graft 3 --log -u foo | 427 $ hg graft 3 --log -u foo |
428 grafting 3:4c60f11aa304 "3" | 428 grafting 3:4c60f11aa304 "3" |
429 warning: can't find ancestor for 'c' copied from 'b'! | 429 warning: can't find ancestor for 'c' copied from 'b'! |
430 $ hg log --template '{rev} {parents} {desc}\n' -r tip | 430 $ hg log --template '{rev}:{node|short} {parents} {desc}\n' -r tip |
431 14 1:5d205f8b35b6 3 | 431 14:0c921c65ef1e 1:5d205f8b35b6 3 |
432 (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) | 432 (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) |
433 | 433 |
434 Resolve conflicted graft | 434 Resolve conflicted graft |
435 $ hg up -q 0 | 435 $ hg up -q 0 |
436 $ echo b > a | 436 $ echo b > a |
618 changeset: 13:7a4785234d87 | 618 changeset: 13:7a4785234d87 |
619 user: foo | 619 user: foo |
620 date: Thu Jan 01 00:00:00 1970 +0000 | 620 date: Thu Jan 01 00:00:00 1970 +0000 |
621 summary: 2 | 621 summary: 2 |
622 | 622 |
623 changeset: 14:f64defefacee | 623 changeset: 14:0c921c65ef1e |
624 parent: 1:5d205f8b35b6 | 624 parent: 1:5d205f8b35b6 |
625 user: foo | 625 user: foo |
626 date: Thu Jan 01 00:00:00 1970 +0000 | 626 date: Thu Jan 01 00:00:00 1970 +0000 |
627 summary: 3 | 627 summary: 3 |
628 | 628 |