##// END OF EJS Templates
rebase: change "result would have 3 parent" error message (BC)...
Jun Wu -
r33786:19f495fe default
parent child Browse files
Show More
@@ -1091,10 +1091,9 b' def defineparents(repo, rev, dest, state'
1091 # /| # None of A and B will be changed to D and rebase fails.
1091 # /| # None of A and B will be changed to D and rebase fails.
1092 # A B D
1092 # A B D
1093 if set(newps) == set(oldps) and dest not in newps:
1093 if set(newps) == set(oldps) and dest not in newps:
1094 # The error message is for compatibility. It's a bit misleading
1094 raise error.Abort(_('cannot rebase %d:%s without '
1095 # since rebase is not supposed to add new parents.
1095 'moving at least one of its parents')
1096 raise error.Abort(_('cannot use revision %d as base, '
1096 % (rev, repo[rev]))
1097 'result would have 3 parents') % rev)
1098
1097
1099 repo.ui.debug(" future parents are %d and %d\n" % tuple(newps))
1098 repo.ui.debug(" future parents are %d and %d\n" % tuple(newps))
1100
1099
@@ -23,7 +23,7 b' Source looks like "N"'
23 A: A':Z
23 A: A':Z
24 B: B':Z
24 B: B':Z
25 AB: A':Z B':Z
25 AB: A':Z B':Z
26 C: ABORT: cannot use revision 3 as base, result would have 3 parents
26 C: ABORT: cannot rebase 3:a35c07e8a2a4 without moving at least one of its parents
27 AC: A':Z C':A'B
27 AC: A':Z C':A'B
28 BC: B':Z C':B'A
28 BC: B':Z C':B'A
29 ABC: A':Z B':Z C':A'B'
29 ABC: A':Z B':Z C':A'B'
@@ -31,7 +31,7 b' Source looks like "N"'
31 AD: A':Z D':Z
31 AD: A':Z D':Z
32 BD: B':Z D':B'
32 BD: B':Z D':B'
33 ABD: A':Z B':Z D':B'
33 ABD: A':Z B':Z D':B'
34 CD: ABORT: cannot use revision 3 as base, result would have 3 parents
34 CD: ABORT: cannot rebase 3:a35c07e8a2a4 without moving at least one of its parents
35 ACD: A':Z C':A'B D':Z
35 ACD: A':Z C':A'B D':Z
36 BCD: B':Z C':B'A D':B'
36 BCD: B':Z C':B'A D':B'
37 ABCD: A':Z B':Z C':A'B' D':B'
37 ABCD: A':Z B':Z C':A'B' D':B'
@@ -49,7 +49,7 b' Moving backwards'
49 B: B':Z
49 B: B':Z
50 A:
50 A:
51 BA: B':Z
51 BA: B':Z
52 C: ABORT: cannot use revision 3 as base, result would have 3 parents
52 C: ABORT: cannot rebase 3:b8d7149b562b without moving at least one of its parents
53 BC: B':Z C':B'A
53 BC: B':Z C':B'A
54 AC:
54 AC:
55 BAC: B':Z C':B'A
55 BAC: B':Z C':B'A
@@ -494,7 +494,7 b' Detach both parents'
494 not rebasing ignored 4:26805aba1e60 "C" (C)
494 not rebasing ignored 4:26805aba1e60 "C" (C)
495 not rebasing ignored 5:4b61ff5c62e2 "E" (E)
495 not rebasing ignored 5:4b61ff5c62e2 "E" (E)
496 rebasing 6:f15c3adaf214 "F" (F tip)
496 rebasing 6:f15c3adaf214 "F" (F tip)
497 abort: cannot use revision 6 as base, result would have 3 parents
497 abort: cannot rebase 6:f15c3adaf214 without moving at least one of its parents
498 [255]
498 [255]
499
499
500 $ cd ..
500 $ cd ..
@@ -271,7 +271,7 b' G onto B - merge revision with both pare'
271
271
272 $ hg rebase -s 6 -d 1
272 $ hg rebase -s 6 -d 1
273 rebasing 6:eea13746799a "G"
273 rebasing 6:eea13746799a "G"
274 abort: cannot use revision 6 as base, result would have 3 parents
274 abort: cannot rebase 6:eea13746799a without moving at least one of its parents
275 [255]
275 [255]
276 $ hg rebase --abort
276 $ hg rebase --abort
277 rebase aborted
277 rebase aborted
General Comments 0
You need to be logged in to leave comments. Login now