Mercurial > hg
comparison tests/test-rebase-conflicts.t @ 12608:16b854cb80f1
tests: unify test-rebase*
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Fri, 01 Oct 2010 16:10:06 +0200 |
parents | tests/test-rebase-conflicts@2313dc4d9817 |
children | 6cc4b14fb76b |
comparison
equal
deleted
inserted
replaced
12607:1393a81b3bdc | 12608:16b854cb80f1 |
---|---|
1 $ cat >> $HGRCPATH <<EOF | |
2 > [extensions] | |
3 > graphlog= | |
4 > rebase= | |
5 > | |
6 > [alias] | |
7 > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 > EOF | |
9 | |
10 $ hg init a | |
11 $ cd a | |
12 $ echo c1 >common | |
13 $ hg add common | |
14 $ hg ci -m C1 | |
15 | |
16 $ echo c2 >>common | |
17 $ hg ci -m C2 | |
18 | |
19 $ echo c3 >>common | |
20 $ hg ci -m C3 | |
21 | |
22 $ hg up -q -C 1 | |
23 | |
24 $ echo l1 >>extra | |
25 $ hg add extra | |
26 $ hg ci -m L1 | |
27 created new head | |
28 | |
29 $ sed -e 's/c2/l2/' common > common.new | |
30 $ mv common.new common | |
31 $ hg ci -m L2 | |
32 | |
33 $ echo l3 >> extra2 | |
34 $ hg add extra2 | |
35 $ hg ci -m L3 | |
36 | |
37 $ hg tglog | |
38 @ 5: 'L3' | |
39 | | |
40 o 4: 'L2' | |
41 | | |
42 o 3: 'L1' | |
43 | | |
44 | o 2: 'C3' | |
45 |/ | |
46 o 1: 'C2' | |
47 | | |
48 o 0: 'C1' | |
49 | |
50 Try to call --continue: | |
51 | |
52 $ hg rebase --continue | |
53 abort: no rebase in progress | |
54 [255] | |
55 | |
56 Conflicting rebase: | |
57 | |
58 $ hg rebase -s 3 -d 2 | |
59 merging common | |
60 warning: conflicts during merge. | |
61 merging common failed! | |
62 abort: fix unresolved conflicts with hg resolve then run hg rebase --continue | |
63 [255] | |
64 | |
65 Try to continue without solving the conflict: | |
66 | |
67 $ hg rebase --continue | |
68 abort: unresolved merge conflicts (see hg resolve) | |
69 [255] | |
70 | |
71 Conclude rebase: | |
72 | |
73 $ echo 'resolved merge' >common | |
74 $ hg resolve -m common | |
75 $ hg rebase --continue | |
76 saved backup bundle to */.hg/strip-backup/*-backup.hg (glob) | |
77 | |
78 $ hg tglog | |
79 @ 5: 'L3' | |
80 | | |
81 o 4: 'L2' | |
82 | | |
83 o 3: 'L1' | |
84 | | |
85 o 2: 'C3' | |
86 | | |
87 o 1: 'C2' | |
88 | | |
89 o 0: 'C1' | |
90 | |
91 Check correctness: | |
92 | |
93 $ hg cat -r 0 common | |
94 c1 | |
95 | |
96 $ hg cat -r 1 common | |
97 c1 | |
98 c2 | |
99 | |
100 $ hg cat -r 2 common | |
101 c1 | |
102 c2 | |
103 c3 | |
104 | |
105 $ hg cat -r 3 common | |
106 c1 | |
107 c2 | |
108 c3 | |
109 | |
110 $ hg cat -r 4 common | |
111 resolved merge | |
112 | |
113 $ hg cat -r 5 common | |
114 resolved merge | |
115 |