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