| 1 |
https://bz.mercurial-scm.org/522 |
| 2 |
|
| 3 |
In the merge below, the file "foo" has the same contents in both |
| 4 |
parents, but if we look at the file-level history, we'll notice that |
| 5 |
the version in p1 is an ancestor of the version in p2. This test makes |
| 6 |
sure that we'll use the version from p2 in the manifest of the merge |
| 7 |
revision. |
| 8 |
|
| 9 |
$ hg init repo |
| 10 |
$ cd repo |
| 11 |
|
| 12 |
$ echo foo > foo |
| 13 |
$ hg ci -qAm 'add foo' |
| 14 |
|
| 15 |
$ echo bar >> foo |
| 16 |
$ hg ci -m 'change foo' |
| 17 |
|
| 18 |
$ hg backout -r tip -m 'backout changed foo' |
| 19 |
reverting foo |
| 20 |
changeset 2:4d9e78aaceee backs out changeset 1:b515023e500e |
| 21 |
|
| 22 |
$ hg up -C 0 |
| 23 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 24 |
|
| 25 |
$ touch bar |
| 26 |
$ hg ci -qAm 'add bar' |
| 27 |
|
| 28 |
$ hg merge --debug |
| 29 |
resolving manifests |
| 30 |
branchmerge: True, force: False, partial: False |
| 31 |
ancestor: bbd179dfa0a7, local: 71766447bdbb+, remote: 4d9e78aaceee |
| 32 |
foo: remote is newer -> g |
| 33 |
getting foo |
| 34 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 35 |
(branch merge, don't forget to commit) |
| 36 |
|
| 37 |
$ hg debugstate | grep foo |
| 38 |
m 0 -2 unset foo |
| 39 |
|
| 40 |
$ hg st -A foo |
| 41 |
M foo |
| 42 |
|
| 43 |
$ hg ci -m 'merge' |
| 44 |
|
| 45 |
$ hg manifest --debug | grep foo |
| 46 |
c6fc755d7e68f49f880599da29f15add41f42f5a 644 foo |
| 47 |
|
| 48 |
$ hg debugindex foo |
| 49 |
rev linkrev nodeid p1-nodeid p2-nodeid |
| 50 |
0 0 2ed2a3912a0b 000000000000 000000000000 |
| 51 |
1 1 6f4310b00b9a 2ed2a3912a0b 000000000000 |
| 52 |
2 2 c6fc755d7e68 6f4310b00b9a 000000000000 |
| 53 |
|