test-conflict.t
73 lines
| 1.8 KiB
| text/troff
|
Tads3Lexer
/ tests / test-conflict.t
|
r11797 | $ hg init | ||
$ echo "nothing" > a | ||||
$ hg add a | ||||
|
r12156 | $ hg commit -m ancestor | ||
|
r11797 | $ echo "something" > a | ||
|
r12156 | $ hg commit -m branch1 | ||
|
r11797 | $ hg co 0 | ||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ echo "something else" > a | ||||
|
r12156 | $ hg commit -m branch2 | ||
|
r11797 | created new head | ||
$ hg merge 1 | ||||
merging a | ||||
warning: conflicts during merge. | ||||
|
r15501 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') | ||
|
r11797 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | ||
|
r12314 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | ||
|
r12316 | [1] | ||
|
r11797 | |||
$ hg id | ||||
|
r12156 | 32e80765d7fe+75234512624c+ tip | ||
|
r11797 | |||
$ cat a | ||||
|
r21693 | <<<<<<< local: 32e80765d7fe - test: branch2 | ||
|
r21519 | something else | ||
======= | ||||
something | ||||
|
r21693 | >>>>>>> other: 75234512624c - test: branch1 | ||
|
r21519 | |||
$ hg status | ||||
M a | ||||
? a.orig | ||||
Verify custom conflict markers | ||||
$ hg up -q --clean . | ||||
$ printf "\n[ui]\nmergemarkertemplate={author} {rev}\n" >> .hg/hgrc | ||||
$ hg merge 1 | ||||
merging a | ||||
warning: conflicts during merge. | ||||
merging a incomplete! (edit conflicts, then use 'hg resolve --mark') | ||||
0 files updated, 0 files merged, 0 files removed, 1 files unresolved | ||||
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | ||||
[1] | ||||
$ cat a | ||||
<<<<<<< local: test 2 | ||||
something else | ||||
======= | ||||
something | ||||
>>>>>>> other: test 1 | ||||
Verify basic conflict markers | ||||
$ hg up -q --clean . | ||||
$ printf "\n[ui]\nmergemarkers=basic\n" >> .hg/hgrc | ||||
$ hg merge 1 | ||||
merging a | ||||
warning: conflicts during merge. | ||||
merging a incomplete! (edit conflicts, then use 'hg resolve --mark') | ||||
0 files updated, 0 files merged, 0 files removed, 1 files unresolved | ||||
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | ||||
[1] | ||||
$ cat a | ||||
|
r11797 | <<<<<<< local | ||
something else | ||||
======= | ||||
something | ||||
>>>>>>> other | ||||