test-resolve
33 lines
| 548 B
| text/plain
|
TextLexer
/ tests / test-resolve
Martin Geisler
|
r7734 | #!/bin/sh | ||
# test that a commit clears the merge state. | ||||
hg init repo | ||||
cd repo | ||||
echo foo > file | ||||
Martin Geisler
|
r8167 | hg commit -Am 'add file' | ||
Martin Geisler
|
r7734 | |||
echo bar >> file | ||||
Martin Geisler
|
r8167 | hg commit -Am 'append bar' | ||
Martin Geisler
|
r7734 | |||
echo % create a second head | ||||
hg up -C 0 | ||||
echo baz >> file | ||||
Martin Geisler
|
r8167 | hg commit -Am 'append baz' | ||
Martin Geisler
|
r7734 | |||
echo % failing merge | ||||
HGMERGE=internal:fail hg merge | ||||
echo resolved > file | ||||
hg resolve -m file | ||||
Martin Geisler
|
r8167 | hg commit -m 'resolved' | ||
Martin Geisler
|
r7734 | |||
echo % resolve -l, should be empty | ||||
hg resolve -l | ||||
Martin Geisler
|
r11451 | |||
# test crashed merge with empty mergestate | ||||
mkdir .hg/merge | ||||
touch .hg/merge/state | ||||
echo % resolve -l, should be empty | ||||
hg resolve -l | ||||