Mercurial > hg
annotate tests/test-resolve.t @ 26354:c1fb2cab6260
clone: check update rev for being True
In 30be3aeb5344, there was an attempt to fallback to looking up the update
revision assuming it was always a rev but the documentation states:
True means update to default rev, anything else is treated as a revision
Therefore, we should only fallback to looking up the update rev if it is not
True. This bug was found in hg-git and I couldn't think of a test that does
this in pure Mercurial since the source repository is checked for the revision
as well (and therefore gracefully falls back).
author | Sean Farley <sean@farley.io> |
---|---|
date | Thu, 24 Sep 2015 15:52:11 -0700 |
parents | e635bc9bb7d9 |
children | ef1eb6df7071 |
rev | line source |
---|---|
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
1 test that a commit clears the merge state. |
7734 | 2 |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
3 $ hg init repo |
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
4 $ cd repo |
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
5 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
6 $ echo foo > file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
7 $ echo foo > file2 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
8 $ hg commit -Am 'add files' |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
9 adding file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
10 adding file2 |
7734 | 11 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
12 $ echo bar >> file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
13 $ echo bar >> file2 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
14 $ hg commit -Am 'append bar to files' |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
15 |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
16 create a second head with conflicting edits |
7734 | 17 |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
18 $ hg up -C 0 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
19 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
20 $ echo baz >> file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
21 $ echo baz >> file2 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
22 $ hg commit -Am 'append baz to files' |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
23 created new head |
7734 | 24 |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
25 create a third head with no conflicting edits |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
26 $ hg up -qC 0 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
27 $ echo foo > file3 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
28 $ hg commit -Am 'add non-conflicting file' |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
29 adding file3 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
30 created new head |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
31 |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
32 failing merge |
7734 | 33 |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
34 $ hg up -qC 2 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
35 $ hg merge --tool=internal:fail 1 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
36 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
12314
f2daa6ab514a
merge: suggest 'hg up -C .' for discarding changes, not 'hg up -C'
Brodie Rao <brodie@bitheap.org>
parents:
12117
diff
changeset
|
37 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12314
diff
changeset
|
38 [1] |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
39 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
40 resolve -l should contain unresolved entries |
21263
f3e37409ecd3
resolve: split test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
16913
diff
changeset
|
41 |
f3e37409ecd3
resolve: split test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
16913
diff
changeset
|
42 $ hg resolve -l |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
43 U file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
44 U file2 |
21263
f3e37409ecd3
resolve: split test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
16913
diff
changeset
|
45 |
24127
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
46 $ hg resolve -l --no-status |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
47 file1 |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
48 file2 |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
49 |
24125
18af6ebd4001
resolve: silence warning of unknown pats for -l/--list (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
23025
diff
changeset
|
50 resolving an unknown path should emit a warning, but not for -l |
23020
dfad19274d85
test-resolve: clarify test descriptions and consistently use "should"
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
51 |
21265
232de244ab6f
resolve: print warning when no work performed (issue4208)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21264
diff
changeset
|
52 $ hg resolve -m does-not-exist |
21721
6539c4e9c874
resolve: fix grammar of no matching files message
Matt Mackall <mpm@selenic.com>
parents:
21541
diff
changeset
|
53 arguments do not match paths that need resolving |
24125
18af6ebd4001
resolve: silence warning of unknown pats for -l/--list (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
23025
diff
changeset
|
54 $ hg resolve -l does-not-exist |
21265
232de244ab6f
resolve: print warning when no work performed (issue4208)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21264
diff
changeset
|
55 |
21263
f3e37409ecd3
resolve: split test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
16913
diff
changeset
|
56 resolve the failure |
f3e37409ecd3
resolve: split test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
16913
diff
changeset
|
57 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
58 $ echo resolved > file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
59 $ hg resolve -m file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
60 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
61 resolve -l should show resolved file as resolved |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
62 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
63 $ hg resolve -l |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
64 R file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
65 U file2 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
66 |
24127
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
67 $ hg resolve -l -Tjson |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
68 [ |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
69 { |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
70 "path": "file1", |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
71 "status": "R" |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
72 }, |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
73 { |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
74 "path": "file2", |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
75 "status": "U" |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
76 } |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
77 ] |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
78 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
79 resolve -m without paths should mark all resolved |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
80 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
81 $ hg resolve -m |
21947
b081decd9062
resolve: add parenthesis around "no more unresolved files" message
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21721
diff
changeset
|
82 (no more unresolved files) |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
83 $ hg commit -m 'resolved' |
7734 | 84 |
23020
dfad19274d85
test-resolve: clarify test descriptions and consistently use "should"
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
85 resolve -l should be empty after commit |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
86 |
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
87 $ hg resolve -l |
21541
6062593d8b06
resolve: don't abort resolve -l even when no merge is in progress
Siddharth Agarwal <sid0@fb.com>
parents:
21267
diff
changeset
|
88 |
24127
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
89 $ hg resolve -l -Tjson |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
90 [ |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
91 ] |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
92 |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
93 resolve --all should abort when no merge in progress |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
94 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
95 $ hg resolve --all |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
96 abort: resolve command not applicable when not merging |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
97 [255] |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
98 |
23020
dfad19274d85
test-resolve: clarify test descriptions and consistently use "should"
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
99 resolve -m should abort when no merge in progress |
dfad19274d85
test-resolve: clarify test descriptions and consistently use "should"
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
100 |
21541
6062593d8b06
resolve: don't abort resolve -l even when no merge is in progress
Siddharth Agarwal <sid0@fb.com>
parents:
21267
diff
changeset
|
101 $ hg resolve -m |
21264
4e932dc5c113
resolve: abort when not applicable (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21263
diff
changeset
|
102 abort: resolve command not applicable when not merging |
4e932dc5c113
resolve: abort when not applicable (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21263
diff
changeset
|
103 [255] |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
104 |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
105 set up conflict-free merge |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
106 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
107 $ hg up -qC 3 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
108 $ hg merge 1 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
109 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
110 (branch merge, don't forget to commit) |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
111 |
23024
ec36969497de
resolve: run happily after conflict-free merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23023
diff
changeset
|
112 resolve --all should do nothing in merge without conflicts |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
113 $ hg resolve --all |
23024
ec36969497de
resolve: run happily after conflict-free merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23023
diff
changeset
|
114 (no more unresolved files) |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
115 |
23024
ec36969497de
resolve: run happily after conflict-free merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23023
diff
changeset
|
116 resolve -m should do nothing in merge without conflicts |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
117 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
118 $ hg resolve -m |
23024
ec36969497de
resolve: run happily after conflict-free merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23023
diff
changeset
|
119 (no more unresolved files) |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
120 |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
121 get back to conflicting state |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
122 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
123 $ hg up -qC 2 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
124 $ hg merge --tool=internal:fail 1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
125 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
126 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
127 [1] |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
128 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
129 resolve without arguments should suggest --all |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
130 $ hg resolve |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
131 abort: no files or directories specified |
26352
e635bc9bb7d9
resolve: consistently describe re-merge + unresolved
timeless@mozdev.org
parents:
24127
diff
changeset
|
132 (use --all to re-merge all unresolved files) |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
133 [255] |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
134 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
135 resolve --all should re-merge all unresolved files |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
136 $ hg resolve -q --all |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
137 warning: conflicts during merge. |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
138 merging file1 incomplete! (edit conflicts, then use 'hg resolve --mark') |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
139 warning: conflicts during merge. |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
140 merging file2 incomplete! (edit conflicts, then use 'hg resolve --mark') |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
141 [1] |
23025
b8dd8432395d
test-resolve.t: use redirection to /dev/null instead of grep -q
Augie Fackler <raf@durin42.com>
parents:
23024
diff
changeset
|
142 $ grep '<<<' file1 > /dev/null |
b8dd8432395d
test-resolve.t: use redirection to /dev/null instead of grep -q
Augie Fackler <raf@durin42.com>
parents:
23024
diff
changeset
|
143 $ grep '<<<' file2 > /dev/null |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
144 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
145 resolve <file> should re-merge file |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
146 $ echo resolved > file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
147 $ hg resolve -q file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
148 warning: conflicts during merge. |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
149 merging file1 incomplete! (edit conflicts, then use 'hg resolve --mark') |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
150 [1] |
23025
b8dd8432395d
test-resolve.t: use redirection to /dev/null instead of grep -q
Augie Fackler <raf@durin42.com>
parents:
23024
diff
changeset
|
151 $ grep '<<<' file1 > /dev/null |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
152 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
153 resolve <file> should do nothing if 'file' was marked resolved |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
154 $ echo resolved > file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
155 $ hg resolve -m file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
156 $ hg resolve -q file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
157 $ cat file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
158 resolved |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
159 |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
160 test crashed merge with empty mergestate |
7734 | 161 |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
162 $ hg up -qC 1 |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
163 $ mkdir .hg/merge |
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
164 $ touch .hg/merge/state |
11451
51021f4c80b5
resolve: do not crash on empty mergestate
Martin Geisler <mg@lazybytes.net>
parents:
8167
diff
changeset
|
165 |
23020
dfad19274d85
test-resolve: clarify test descriptions and consistently use "should"
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
166 resolve -l should be empty |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
167 |
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
168 $ hg resolve -l |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
12788
diff
changeset
|
169 |
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
12788
diff
changeset
|
170 $ cd .. |