Show More
@@ -1341,8 +1341,12 b' def update(repo, node, branchmerge, forc' | |||
|
1341 | 1341 | fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2) |
|
1342 | 1342 | |
|
1343 | 1343 | ### check phase |
|
1344 |
if not overwrite |
|
|
1345 | raise error.Abort(_("outstanding uncommitted merge")) | |
|
1344 | if not overwrite: | |
|
1345 | if len(pl) > 1: | |
|
1346 | raise error.Abort(_("outstanding uncommitted merge")) | |
|
1347 | ms = mergestate.read(repo) | |
|
1348 | if list(ms.unresolved()): | |
|
1349 | raise error.Abort(_("outstanding merge conflicts")) | |
|
1346 | 1350 | if branchmerge: |
|
1347 | 1351 | if pas == [p2]: |
|
1348 | 1352 | raise error.Abort(_("merging with a working directory ancestor" |
@@ -59,6 +59,9 b' Local merge with bad merge tool:' | |||
|
59 | 59 | use 'hg resolve' to retry unresolved file merges |
|
60 | 60 | [1] |
|
61 | 61 | |
|
62 | $ hg resolve -m | |
|
63 | (no more unresolved files) | |
|
64 | ||
|
62 | 65 | $ hg co 0 |
|
63 | 66 | merging zzz1_merge_ok |
|
64 | 67 | merging zzz2_merge_bad |
@@ -83,6 +86,9 b' Local merge with bad merge tool:' | |||
|
83 | 86 | |
|
84 | 87 | Local merge with conflicts: |
|
85 | 88 | |
|
89 | $ hg resolve -m | |
|
90 | (no more unresolved files) | |
|
91 | ||
|
86 | 92 | $ hg co |
|
87 | 93 | merging zzz1_merge_ok |
|
88 | 94 | merging zzz2_merge_bad |
@@ -91,6 +97,9 b' Local merge with conflicts:' | |||
|
91 | 97 | use 'hg resolve' to retry unresolved file merges |
|
92 | 98 | [1] |
|
93 | 99 | |
|
100 | $ hg resolve -m | |
|
101 | (no more unresolved files) | |
|
102 | ||
|
94 | 103 | $ hg co 0 --config 'ui.origbackuppath=.hg/origbackups' |
|
95 | 104 | merging zzz1_merge_ok |
|
96 | 105 | merging zzz2_merge_bad |
@@ -124,6 +133,9 b' Local merge without conflicts:' | |||
|
124 | 133 | |
|
125 | 134 | $ hg revert zzz2_merge_bad |
|
126 | 135 | |
|
136 | $ hg resolve -m | |
|
137 | (no more unresolved files) | |
|
138 | ||
|
127 | 139 | $ hg co |
|
128 | 140 | merging zzz1_merge_ok |
|
129 | 141 | 4 files updated, 1 files merged, 2 files removed, 0 files unresolved |
@@ -154,6 +154,26 b' resolve -m should abort when no merge in' | |||
|
154 | 154 | abort: resolve command not applicable when not merging |
|
155 | 155 | [255] |
|
156 | 156 | |
|
157 | can not update or merge when there are unresolved conflicts | |
|
158 | ||
|
159 | $ hg up -qC 0 | |
|
160 | $ echo quux >> file1 | |
|
161 | $ hg up 1 | |
|
162 | merging file1 | |
|
163 | warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') | |
|
164 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
|
165 | use 'hg resolve' to retry unresolved file merges | |
|
166 | [1] | |
|
167 | $ hg up 0 | |
|
168 | abort: outstanding merge conflicts | |
|
169 | [255] | |
|
170 | $ hg merge 2 | |
|
171 | abort: outstanding merge conflicts | |
|
172 | [255] | |
|
173 | $ hg merge --force 2 | |
|
174 | abort: outstanding merge conflicts | |
|
175 | [255] | |
|
176 | ||
|
157 | 177 | set up conflict-free merge |
|
158 | 178 | |
|
159 | 179 | $ hg up -qC 3 |
General Comments 0
You need to be logged in to leave comments.
Login now