Show More
@@ -221,12 +221,11 b' def update(repo, node, branchmerge=False' | |||||
221 | backwards = (pa == p2) |
|
221 | backwards = (pa == p2) | |
222 |
|
222 | |||
223 | # is there a linear path from p1 to p2? |
|
223 | # is there a linear path from p1 to p2? | |
224 |
|
|
224 | if pa == p1 or pa == p2: | |
225 |
if branchmerge |
|
225 | if branchmerge: | |
226 | raise util.Abort(_("there is nothing to merge, just use " |
|
226 | raise util.Abort(_("there is nothing to merge, just use " | |
227 | "'hg update' or look at 'hg heads'")) |
|
227 | "'hg update' or look at 'hg heads'")) | |
228 |
|
228 | elif not (overwrite or branchmerge): | ||
229 | if not linear and not (overwrite or branchmerge): |
|
|||
230 | raise util.Abort(_("update spans branches, use 'hg merge' " |
|
229 | raise util.Abort(_("update spans branches, use 'hg merge' " | |
231 | "or 'hg update -C' to lose changes")) |
|
230 | "or 'hg update -C' to lose changes")) | |
232 |
|
231 | |||
@@ -243,8 +242,8 b' def update(repo, node, branchmerge=False' | |||||
243 | # resolve the manifest to determine which files |
|
242 | # resolve the manifest to determine which files | |
244 | # we care about merging |
|
243 | # we care about merging | |
245 | repo.ui.note(_("resolving manifests\n")) |
|
244 | repo.ui.note(_("resolving manifests\n")) | |
246 |
repo.ui.debug(_(" overwrite %s branchmerge %s partial %s |
|
245 | repo.ui.debug(_(" overwrite %s branchmerge %s partial %s\n") % | |
247 |
(overwrite, branchmerge, bool(partial) |
|
246 | (overwrite, branchmerge, bool(partial))) | |
248 | repo.ui.debug(_(" ancestor %s local %s remote %s\n") % |
|
247 | repo.ui.debug(_(" ancestor %s local %s remote %s\n") % | |
249 | (short(p1), short(p2), short(pa))) |
|
248 | (short(p1), short(p2), short(pa))) | |
250 |
|
249 | |||
@@ -253,14 +252,14 b' def update(repo, node, branchmerge=False' | |||||
253 |
|
252 | |||
254 | if not force: |
|
253 | if not force: | |
255 | checkunknown(repo, m2, status) |
|
254 | checkunknown(repo, m2, status) | |
256 | if linear: |
|
255 | if not branchmerge: | |
257 | action += forgetremoved(m2, status) |
|
256 | action += forgetremoved(m2, status) | |
258 | action += manifestmerge(repo.ui, m1, m2, ma, overwrite, backwards, partial) |
|
257 | action += manifestmerge(repo.ui, m1, m2, ma, overwrite, backwards, partial) | |
259 | del m1, m2, ma |
|
258 | del m1, m2, ma | |
260 |
|
259 | |||
261 | ### apply phase |
|
260 | ### apply phase | |
262 |
|
261 | |||
263 | if linear or overwrite: |
|
262 | if not branchmerge: | |
264 | # we don't need to do any magic, just jump to the new rev |
|
263 | # we don't need to do any magic, just jump to the new rev | |
265 | p1, p2 = p2, nullid |
|
264 | p1, p2 = p2, nullid | |
266 |
|
265 |
@@ -22,7 +22,7 b' added 1 changesets with 1 changes to 1 f' | |||||
22 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
22 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
23 | merge: warning: conflicts during merge |
|
23 | merge: warning: conflicts during merge | |
24 | resolving manifests |
|
24 | resolving manifests | |
25 |
overwrite None branchmerge True partial False |
|
25 | overwrite None branchmerge True partial False | |
26 | ancestor 451c744aabcc local a070d41e8360 remote faaea63e63a9 |
|
26 | ancestor 451c744aabcc local a070d41e8360 remote faaea63e63a9 | |
27 | test.txt versions differ, resolve |
|
27 | test.txt versions differ, resolve | |
28 | merging test.txt |
|
28 | merging test.txt |
@@ -15,7 +15,7 b' date: Mon Jan 12 13:46:40 1970 +0' | |||||
15 | summary: 1 |
|
15 | summary: 1 | |
16 |
|
16 | |||
17 | resolving manifests |
|
17 | resolving manifests | |
18 |
overwrite False branchmerge False partial False |
|
18 | overwrite False branchmerge False partial False | |
19 | ancestor 33aaa84a386b local 802f095af299 remote 33aaa84a386b |
|
19 | ancestor 33aaa84a386b local 802f095af299 remote 33aaa84a386b | |
20 | a versions differ, resolve |
|
20 | a versions differ, resolve | |
21 | remote created b |
|
21 | remote created b | |
@@ -31,7 +31,7 b' date: Mon Jan 12 13:46:40 1970 +0' | |||||
31 | summary: 2 |
|
31 | summary: 2 | |
32 |
|
32 | |||
33 | resolving manifests |
|
33 | resolving manifests | |
34 |
overwrite False branchmerge False partial False |
|
34 | overwrite False branchmerge False partial False | |
35 | ancestor 802f095af299 local 33aaa84a386b remote 33aaa84a386b |
|
35 | ancestor 802f095af299 local 33aaa84a386b remote 33aaa84a386b | |
36 | remote deleted b |
|
36 | remote deleted b | |
37 | removing b |
|
37 | removing b | |
@@ -49,7 +49,7 b' date: Mon Jan 12 13:46:40 1970 +0' | |||||
49 | summary: 1 |
|
49 | summary: 1 | |
50 |
|
50 | |||
51 | resolving manifests |
|
51 | resolving manifests | |
52 |
overwrite False branchmerge False partial False |
|
52 | overwrite False branchmerge False partial False | |
53 | ancestor 33aaa84a386b local 802f095af299 remote 33aaa84a386b |
|
53 | ancestor 33aaa84a386b local 802f095af299 remote 33aaa84a386b | |
54 | a versions differ, resolve |
|
54 | a versions differ, resolve | |
55 | remote created b |
|
55 | remote created b | |
@@ -100,7 +100,7 b' failed' | |||||
100 | abort: outstanding uncommitted changes |
|
100 | abort: outstanding uncommitted changes | |
101 | failed |
|
101 | failed | |
102 | resolving manifests |
|
102 | resolving manifests | |
103 |
overwrite False branchmerge True partial False |
|
103 | overwrite False branchmerge True partial False | |
104 | ancestor 802f095af299 local 030602aee63d remote 33aaa84a386b |
|
104 | ancestor 802f095af299 local 030602aee63d remote 33aaa84a386b | |
105 | a versions differ, resolve |
|
105 | a versions differ, resolve | |
106 | b versions differ, resolve |
|
106 | b versions differ, resolve |
@@ -40,7 +40,7 b' a' | |||||
40 | side1 |
|
40 | side1 | |
41 | side2 |
|
41 | side2 | |
42 | resolving manifests |
|
42 | resolving manifests | |
43 |
overwrite True branchmerge False partial False |
|
43 | overwrite True branchmerge False partial False | |
44 | ancestor ded32b0db104 local 221226fb2bd8 remote 537353581d3d |
|
44 | ancestor ded32b0db104 local 221226fb2bd8 remote 537353581d3d | |
45 | remote deleted side2, clobbering |
|
45 | remote deleted side2, clobbering | |
46 | remote deleted side1, clobbering |
|
46 | remote deleted side1, clobbering |
General Comments 0
You need to be logged in to leave comments.
Login now