Mercurial > hg
annotate tests/test-resolve @ 12110:58a8105242a5
tests: unify test-revert-flags
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Mon, 30 Aug 2010 13:45:24 +0900 |
parents | 51021f4c80b5 |
children |
rev | line source |
---|---|
7734 | 1 #!/bin/sh |
2 | |
3 # test that a commit clears the merge state. | |
4 | |
5 hg init repo | |
6 cd repo | |
7 | |
8 echo foo > file | |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7734
diff
changeset
|
9 hg commit -Am 'add file' |
7734 | 10 |
11 echo bar >> file | |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7734
diff
changeset
|
12 hg commit -Am 'append bar' |
7734 | 13 |
14 echo % create a second head | |
15 hg up -C 0 | |
16 echo baz >> file | |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7734
diff
changeset
|
17 hg commit -Am 'append baz' |
7734 | 18 |
19 echo % failing merge | |
20 HGMERGE=internal:fail hg merge | |
21 | |
22 echo resolved > file | |
23 hg resolve -m file | |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7734
diff
changeset
|
24 hg commit -m 'resolved' |
7734 | 25 |
26 echo % resolve -l, should be empty | |
27 hg resolve -l | |
11451
51021f4c80b5
resolve: do not crash on empty mergestate
Martin Geisler <mg@lazybytes.net>
parents:
8167
diff
changeset
|
28 |
51021f4c80b5
resolve: do not crash on empty mergestate
Martin Geisler <mg@lazybytes.net>
parents:
8167
diff
changeset
|
29 # test crashed merge with empty mergestate |
51021f4c80b5
resolve: do not crash on empty mergestate
Martin Geisler <mg@lazybytes.net>
parents:
8167
diff
changeset
|
30 mkdir .hg/merge |
51021f4c80b5
resolve: do not crash on empty mergestate
Martin Geisler <mg@lazybytes.net>
parents:
8167
diff
changeset
|
31 touch .hg/merge/state |
51021f4c80b5
resolve: do not crash on empty mergestate
Martin Geisler <mg@lazybytes.net>
parents:
8167
diff
changeset
|
32 echo % resolve -l, should be empty |
51021f4c80b5
resolve: do not crash on empty mergestate
Martin Geisler <mg@lazybytes.net>
parents:
8167
diff
changeset
|
33 hg resolve -l |