Show More
@@ -1,122 +1,85 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
6 | > [alias] |
|
6 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 | $ hg init a |
|
10 | $ hg init a | |
11 | $ cd a |
|
11 | $ cd a | |
12 | $ hg unbundle $TESTDIR/bundles/rebase.hg |
|
12 | $ hg unbundle $TESTDIR/bundles/rebase.hg | |
13 | adding changesets |
|
13 | adding changesets | |
14 | adding manifests |
|
14 | adding manifests | |
15 | adding file changes |
|
15 | adding file changes | |
16 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
16 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
17 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
17 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
18 | $ hg up tip |
|
18 | $ hg up tip | |
19 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
19 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
20 | $ cd .. |
|
20 | $ cd .. | |
21 |
|
21 | |||
22 |
|
22 | |||
23 | Rebasing descendant onto ancestor across different named branches |
|
23 | Rebasing descendant onto ancestor across different named branches | |
24 |
|
24 | |||
25 | $ hg clone -q -u . a a1 |
|
25 | $ hg clone -q -u . a a1 | |
26 |
|
26 | |||
27 | $ cd a1 |
|
27 | $ cd a1 | |
28 |
|
28 | |||
29 | $ hg branch dev |
|
29 | $ hg branch dev | |
30 | marked working directory as branch dev |
|
30 | marked working directory as branch dev | |
31 |
|
31 | |||
32 | $ echo x > x |
|
32 | $ echo x > x | |
33 |
|
33 | |||
34 | $ hg add x |
|
34 | $ hg add x | |
35 |
|
35 | |||
36 | $ hg ci -m 'extra named branch' |
|
36 | $ hg ci -m 'extra named branch' | |
37 |
|
37 | |||
38 | $ hg tglog |
|
38 | $ hg tglog | |
39 | @ 8: 'extra named branch' dev |
|
39 | @ 8: 'extra named branch' dev | |
40 | | |
|
40 | | | |
41 | o 7: 'H' |
|
41 | o 7: 'H' | |
42 | | |
|
42 | | | |
43 | | o 6: 'G' |
|
43 | | o 6: 'G' | |
44 | |/| |
|
44 | |/| | |
45 | o | 5: 'F' |
|
45 | o | 5: 'F' | |
46 | | | |
|
46 | | | | |
47 | | o 4: 'E' |
|
47 | | o 4: 'E' | |
48 | |/ |
|
48 | |/ | |
49 | | o 3: 'D' |
|
49 | | o 3: 'D' | |
50 | | | |
|
50 | | | | |
51 | | o 2: 'C' |
|
51 | | o 2: 'C' | |
52 | | | |
|
52 | | | | |
53 | | o 1: 'B' |
|
53 | | o 1: 'B' | |
54 | |/ |
|
54 | |/ | |
55 | o 0: 'A' |
|
55 | o 0: 'A' | |
56 |
|
56 | |||
57 |
|
57 | |||
58 |
|
58 | |||
59 | $ hg rebase -s 7 -d 8 |
|
59 | $ hg rebase -s 7 -d 8 | |
60 | abort: source is ancestor of destination |
|
60 | abort: source is ancestor of destination | |
61 | [255] |
|
61 | [255] | |
62 |
|
62 | |||
63 | $ hg rebase -s 8 -d 7 |
|
63 | $ hg rebase -s 8 -d 7 | |
64 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) |
|
64 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) | |
65 |
|
65 | |||
66 | $ hg tglog |
|
66 | $ hg tglog | |
67 | @ 8: 'extra named branch' |
|
67 | @ 8: 'extra named branch' | |
68 | | |
|
68 | | | |
69 | o 7: 'H' |
|
69 | o 7: 'H' | |
70 | | |
|
70 | | | |
71 | | o 6: 'G' |
|
71 | | o 6: 'G' | |
72 | |/| |
|
72 | |/| | |
73 | o | 5: 'F' |
|
73 | o | 5: 'F' | |
74 | | | |
|
74 | | | | |
75 | | o 4: 'E' |
|
75 | | o 4: 'E' | |
76 | |/ |
|
76 | |/ | |
77 | | o 3: 'D' |
|
77 | | o 3: 'D' | |
78 | | | |
|
78 | | | | |
79 | | o 2: 'C' |
|
79 | | o 2: 'C' | |
80 | | | |
|
80 | | | | |
81 | | o 1: 'B' |
|
81 | | o 1: 'B' | |
82 | |/ |
|
82 | |/ | |
83 | o 0: 'A' |
|
83 | o 0: 'A' | |
84 |
|
84 | |||
85 | $ cd .. |
|
85 | $ cd .. | |
86 |
|
||||
87 | Rebasing descendant onto ancestor across the same named branches |
|
|||
88 |
|
||||
89 | $ hg clone -q -u . a a2 |
|
|||
90 |
|
||||
91 | $ cd a2 |
|
|||
92 |
|
||||
93 | $ echo I > I |
|
|||
94 |
|
||||
95 | $ hg ci -AmI |
|
|||
96 | adding I |
|
|||
97 |
|
||||
98 | $ hg tglog |
|
|||
99 | @ 8: 'I' |
|
|||
100 | | |
|
|||
101 | o 7: 'H' |
|
|||
102 | | |
|
|||
103 | | o 6: 'G' |
|
|||
104 | |/| |
|
|||
105 | o | 5: 'F' |
|
|||
106 | | | |
|
|||
107 | | o 4: 'E' |
|
|||
108 | |/ |
|
|||
109 | | o 3: 'D' |
|
|||
110 | | | |
|
|||
111 | | o 2: 'C' |
|
|||
112 | | | |
|
|||
113 | | o 1: 'B' |
|
|||
114 | |/ |
|
|||
115 | o 0: 'A' |
|
|||
116 |
|
||||
117 | $ hg rebase -s 8 -d 7 |
|
|||
118 | abort: source is descendant of destination |
|
|||
119 | [255] |
|
|||
120 |
|
||||
121 | $ cd .. |
|
|||
122 |
|
@@ -1,385 +1,389 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
6 | > [alias] |
|
6 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | $ hg init a |
|
11 | $ hg init a | |
12 | $ cd a |
|
12 | $ cd a | |
13 | $ hg unbundle $TESTDIR/bundles/rebase.hg |
|
13 | $ hg unbundle $TESTDIR/bundles/rebase.hg | |
14 | adding changesets |
|
14 | adding changesets | |
15 | adding manifests |
|
15 | adding manifests | |
16 | adding file changes |
|
16 | adding file changes | |
17 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
17 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
18 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
18 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
19 | $ hg up tip |
|
19 | $ hg up tip | |
20 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
20 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
21 |
|
21 | |||
22 | $ echo I > I |
|
22 | $ echo I > I | |
23 | $ hg ci -AmI |
|
23 | $ hg ci -AmI | |
24 | adding I |
|
24 | adding I | |
25 |
|
25 | |||
26 | $ hg tglog |
|
26 | $ hg tglog | |
27 | @ 8: 'I' |
|
27 | @ 8: 'I' | |
28 | | |
|
28 | | | |
29 | o 7: 'H' |
|
29 | o 7: 'H' | |
30 | | |
|
30 | | | |
31 | | o 6: 'G' |
|
31 | | o 6: 'G' | |
32 | |/| |
|
32 | |/| | |
33 | o | 5: 'F' |
|
33 | o | 5: 'F' | |
34 | | | |
|
34 | | | | |
35 | | o 4: 'E' |
|
35 | | o 4: 'E' | |
36 | |/ |
|
36 | |/ | |
37 | | o 3: 'D' |
|
37 | | o 3: 'D' | |
38 | | | |
|
38 | | | | |
39 | | o 2: 'C' |
|
39 | | o 2: 'C' | |
40 | | | |
|
40 | | | | |
41 | | o 1: 'B' |
|
41 | | o 1: 'B' | |
42 | |/ |
|
42 | |/ | |
43 | o 0: 'A' |
|
43 | o 0: 'A' | |
44 |
|
44 | |||
45 | $ cd .. |
|
45 | $ cd .. | |
46 |
|
46 | |||
47 |
|
47 | |||
48 | These fail: |
|
48 | These fail: | |
49 |
|
49 | |||
50 | $ hg clone -q -u . a a1 |
|
50 | $ hg clone -q -u . a a1 | |
51 | $ cd a1 |
|
51 | $ cd a1 | |
52 |
|
52 | |||
|
53 | $ hg rebase -s 8 -d 7 | |||
|
54 | abort: source is descendant of destination | |||
|
55 | [255] | |||
|
56 | ||||
53 | $ hg rebase --continue --abort |
|
57 | $ hg rebase --continue --abort | |
54 | abort: cannot use both abort and continue |
|
58 | abort: cannot use both abort and continue | |
55 | [255] |
|
59 | [255] | |
56 |
|
60 | |||
57 | $ hg rebase --continue --collapse |
|
61 | $ hg rebase --continue --collapse | |
58 | abort: cannot use collapse with continue or abort |
|
62 | abort: cannot use collapse with continue or abort | |
59 | [255] |
|
63 | [255] | |
60 |
|
64 | |||
61 | $ hg rebase --continue --dest 4 |
|
65 | $ hg rebase --continue --dest 4 | |
62 | abort: abort and continue do not allow specifying revisions |
|
66 | abort: abort and continue do not allow specifying revisions | |
63 | [255] |
|
67 | [255] | |
64 |
|
68 | |||
65 | $ hg rebase --base 5 --source 4 |
|
69 | $ hg rebase --base 5 --source 4 | |
66 | abort: cannot specify both a revision and a base |
|
70 | abort: cannot specify both a revision and a base | |
67 | [255] |
|
71 | [255] | |
68 |
|
72 | |||
69 | $ hg rebase |
|
73 | $ hg rebase | |
70 | nothing to rebase |
|
74 | nothing to rebase | |
71 | [1] |
|
75 | [1] | |
72 |
|
76 | |||
73 | $ hg up -q 7 |
|
77 | $ hg up -q 7 | |
74 |
|
78 | |||
75 | $ hg rebase |
|
79 | $ hg rebase | |
76 | nothing to rebase |
|
80 | nothing to rebase | |
77 | [1] |
|
81 | [1] | |
78 |
|
82 | |||
79 |
|
83 | |||
80 | These work: |
|
84 | These work: | |
81 |
|
85 | |||
82 | Rebase with no arguments (from 3 onto 8): |
|
86 | Rebase with no arguments (from 3 onto 8): | |
83 |
|
87 | |||
84 | $ hg up -q -C 3 |
|
88 | $ hg up -q -C 3 | |
85 |
|
89 | |||
86 | $ hg rebase |
|
90 | $ hg rebase | |
87 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) |
|
91 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) | |
88 |
|
92 | |||
89 | $ hg tglog |
|
93 | $ hg tglog | |
90 | @ 8: 'D' |
|
94 | @ 8: 'D' | |
91 | | |
|
95 | | | |
92 | o 7: 'C' |
|
96 | o 7: 'C' | |
93 | | |
|
97 | | | |
94 | o 6: 'B' |
|
98 | o 6: 'B' | |
95 | | |
|
99 | | | |
96 | o 5: 'I' |
|
100 | o 5: 'I' | |
97 | | |
|
101 | | | |
98 | o 4: 'H' |
|
102 | o 4: 'H' | |
99 | | |
|
103 | | | |
100 | | o 3: 'G' |
|
104 | | o 3: 'G' | |
101 | |/| |
|
105 | |/| | |
102 | o | 2: 'F' |
|
106 | o | 2: 'F' | |
103 | | | |
|
107 | | | | |
104 | | o 1: 'E' |
|
108 | | o 1: 'E' | |
105 | |/ |
|
109 | |/ | |
106 | o 0: 'A' |
|
110 | o 0: 'A' | |
107 |
|
111 | |||
108 | Try to rollback after a rebase (fail): |
|
112 | Try to rollback after a rebase (fail): | |
109 |
|
113 | |||
110 | $ hg rollback |
|
114 | $ hg rollback | |
111 | no rollback information available |
|
115 | no rollback information available | |
112 | [1] |
|
116 | [1] | |
113 |
|
117 | |||
114 | $ cd .. |
|
118 | $ cd .. | |
115 |
|
119 | |||
116 |
|
120 | |||
117 | Rebase with base == '.' => same as no arguments (from 3 onto 8): |
|
121 | Rebase with base == '.' => same as no arguments (from 3 onto 8): | |
118 |
|
122 | |||
119 | $ hg clone -q -u 3 a a2 |
|
123 | $ hg clone -q -u 3 a a2 | |
120 | $ cd a2 |
|
124 | $ cd a2 | |
121 |
|
125 | |||
122 | $ hg rebase --base . |
|
126 | $ hg rebase --base . | |
123 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob) |
|
127 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob) | |
124 |
|
128 | |||
125 | $ hg tglog |
|
129 | $ hg tglog | |
126 | @ 8: 'D' |
|
130 | @ 8: 'D' | |
127 | | |
|
131 | | | |
128 | o 7: 'C' |
|
132 | o 7: 'C' | |
129 | | |
|
133 | | | |
130 | o 6: 'B' |
|
134 | o 6: 'B' | |
131 | | |
|
135 | | | |
132 | o 5: 'I' |
|
136 | o 5: 'I' | |
133 | | |
|
137 | | | |
134 | o 4: 'H' |
|
138 | o 4: 'H' | |
135 | | |
|
139 | | | |
136 | | o 3: 'G' |
|
140 | | o 3: 'G' | |
137 | |/| |
|
141 | |/| | |
138 | o | 2: 'F' |
|
142 | o | 2: 'F' | |
139 | | | |
|
143 | | | | |
140 | | o 1: 'E' |
|
144 | | o 1: 'E' | |
141 | |/ |
|
145 | |/ | |
142 | o 0: 'A' |
|
146 | o 0: 'A' | |
143 |
|
147 | |||
144 | $ cd .. |
|
148 | $ cd .. | |
145 |
|
149 | |||
146 |
|
150 | |||
147 | Rebase with dest == `hg branch` => same as no arguments (from 3 onto 8): |
|
151 | Rebase with dest == `hg branch` => same as no arguments (from 3 onto 8): | |
148 |
|
152 | |||
149 | $ hg clone -q -u 3 a a3 |
|
153 | $ hg clone -q -u 3 a a3 | |
150 | $ cd a3 |
|
154 | $ cd a3 | |
151 |
|
155 | |||
152 | $ hg rebase --dest `hg branch` |
|
156 | $ hg rebase --dest `hg branch` | |
153 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob) |
|
157 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob) | |
154 |
|
158 | |||
155 | $ hg tglog |
|
159 | $ hg tglog | |
156 | @ 8: 'D' |
|
160 | @ 8: 'D' | |
157 | | |
|
161 | | | |
158 | o 7: 'C' |
|
162 | o 7: 'C' | |
159 | | |
|
163 | | | |
160 | o 6: 'B' |
|
164 | o 6: 'B' | |
161 | | |
|
165 | | | |
162 | o 5: 'I' |
|
166 | o 5: 'I' | |
163 | | |
|
167 | | | |
164 | o 4: 'H' |
|
168 | o 4: 'H' | |
165 | | |
|
169 | | | |
166 | | o 3: 'G' |
|
170 | | o 3: 'G' | |
167 | |/| |
|
171 | |/| | |
168 | o | 2: 'F' |
|
172 | o | 2: 'F' | |
169 | | | |
|
173 | | | | |
170 | | o 1: 'E' |
|
174 | | o 1: 'E' | |
171 | |/ |
|
175 | |/ | |
172 | o 0: 'A' |
|
176 | o 0: 'A' | |
173 |
|
177 | |||
174 | $ cd .. |
|
178 | $ cd .. | |
175 |
|
179 | |||
176 |
|
180 | |||
177 | Specify only source (from 2 onto 8): |
|
181 | Specify only source (from 2 onto 8): | |
178 |
|
182 | |||
179 | $ hg clone -q -u . a a4 |
|
183 | $ hg clone -q -u . a a4 | |
180 | $ cd a4 |
|
184 | $ cd a4 | |
181 |
|
185 | |||
182 | $ hg rebase --source 2 |
|
186 | $ hg rebase --source 2 | |
183 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob) |
|
187 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob) | |
184 |
|
188 | |||
185 | $ hg tglog |
|
189 | $ hg tglog | |
186 | @ 8: 'D' |
|
190 | @ 8: 'D' | |
187 | | |
|
191 | | | |
188 | o 7: 'C' |
|
192 | o 7: 'C' | |
189 | |\ |
|
193 | |\ | |
190 | | o 6: 'I' |
|
194 | | o 6: 'I' | |
191 | | | |
|
195 | | | | |
192 | | o 5: 'H' |
|
196 | | o 5: 'H' | |
193 | | | |
|
197 | | | | |
194 | | | o 4: 'G' |
|
198 | | | o 4: 'G' | |
195 | | |/| |
|
199 | | |/| | |
196 | | o | 3: 'F' |
|
200 | | o | 3: 'F' | |
197 | | | | |
|
201 | | | | | |
198 | | | o 2: 'E' |
|
202 | | | o 2: 'E' | |
199 | | |/ |
|
203 | | |/ | |
200 | o | 1: 'B' |
|
204 | o | 1: 'B' | |
201 | |/ |
|
205 | |/ | |
202 | o 0: 'A' |
|
206 | o 0: 'A' | |
203 |
|
207 | |||
204 | $ cd .. |
|
208 | $ cd .. | |
205 |
|
209 | |||
206 |
|
210 | |||
207 | Specify only dest (from 3 onto 6): |
|
211 | Specify only dest (from 3 onto 6): | |
208 |
|
212 | |||
209 | $ hg clone -q -u 3 a a5 |
|
213 | $ hg clone -q -u 3 a a5 | |
210 | $ cd a5 |
|
214 | $ cd a5 | |
211 |
|
215 | |||
212 | $ hg rebase --dest 6 |
|
216 | $ hg rebase --dest 6 | |
213 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob) |
|
217 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob) | |
214 |
|
218 | |||
215 | $ hg tglog |
|
219 | $ hg tglog | |
216 | @ 8: 'D' |
|
220 | @ 8: 'D' | |
217 | | |
|
221 | | | |
218 | o 7: 'C' |
|
222 | o 7: 'C' | |
219 | | |
|
223 | | | |
220 | o 6: 'B' |
|
224 | o 6: 'B' | |
221 | | |
|
225 | | | |
222 | | o 5: 'I' |
|
226 | | o 5: 'I' | |
223 | | | |
|
227 | | | | |
224 | | o 4: 'H' |
|
228 | | o 4: 'H' | |
225 | | | |
|
229 | | | | |
226 | o | 3: 'G' |
|
230 | o | 3: 'G' | |
227 | |\| |
|
231 | |\| | |
228 | | o 2: 'F' |
|
232 | | o 2: 'F' | |
229 | | | |
|
233 | | | | |
230 | o | 1: 'E' |
|
234 | o | 1: 'E' | |
231 | |/ |
|
235 | |/ | |
232 | o 0: 'A' |
|
236 | o 0: 'A' | |
233 |
|
237 | |||
234 | $ cd .. |
|
238 | $ cd .. | |
235 |
|
239 | |||
236 |
|
240 | |||
237 | Specify only base (from 1 onto 8): |
|
241 | Specify only base (from 1 onto 8): | |
238 |
|
242 | |||
239 | $ hg clone -q -u . a a6 |
|
243 | $ hg clone -q -u . a a6 | |
240 | $ cd a6 |
|
244 | $ cd a6 | |
241 |
|
245 | |||
242 | $ hg rebase --base 3 |
|
246 | $ hg rebase --base 3 | |
243 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob) |
|
247 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob) | |
244 |
|
248 | |||
245 | $ hg tglog |
|
249 | $ hg tglog | |
246 | @ 8: 'D' |
|
250 | @ 8: 'D' | |
247 | | |
|
251 | | | |
248 | o 7: 'C' |
|
252 | o 7: 'C' | |
249 | | |
|
253 | | | |
250 | o 6: 'B' |
|
254 | o 6: 'B' | |
251 | | |
|
255 | | | |
252 | o 5: 'I' |
|
256 | o 5: 'I' | |
253 | | |
|
257 | | | |
254 | o 4: 'H' |
|
258 | o 4: 'H' | |
255 | | |
|
259 | | | |
256 | | o 3: 'G' |
|
260 | | o 3: 'G' | |
257 | |/| |
|
261 | |/| | |
258 | o | 2: 'F' |
|
262 | o | 2: 'F' | |
259 | | | |
|
263 | | | | |
260 | | o 1: 'E' |
|
264 | | o 1: 'E' | |
261 | |/ |
|
265 | |/ | |
262 | o 0: 'A' |
|
266 | o 0: 'A' | |
263 |
|
267 | |||
264 | $ cd .. |
|
268 | $ cd .. | |
265 |
|
269 | |||
266 |
|
270 | |||
267 | Specify source and dest (from 2 onto 7): |
|
271 | Specify source and dest (from 2 onto 7): | |
268 |
|
272 | |||
269 | $ hg clone -q -u . a a7 |
|
273 | $ hg clone -q -u . a a7 | |
270 | $ cd a7 |
|
274 | $ cd a7 | |
271 |
|
275 | |||
272 | $ hg rebase --detach --source 2 --dest 7 |
|
276 | $ hg rebase --detach --source 2 --dest 7 | |
273 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/*-backup.hg (glob) |
|
277 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/*-backup.hg (glob) | |
274 |
|
278 | |||
275 | $ hg tglog |
|
279 | $ hg tglog | |
276 | @ 8: 'D' |
|
280 | @ 8: 'D' | |
277 | | |
|
281 | | | |
278 | o 7: 'C' |
|
282 | o 7: 'C' | |
279 | | |
|
283 | | | |
280 | | o 6: 'I' |
|
284 | | o 6: 'I' | |
281 | |/ |
|
285 | |/ | |
282 | o 5: 'H' |
|
286 | o 5: 'H' | |
283 | | |
|
287 | | | |
284 | | o 4: 'G' |
|
288 | | o 4: 'G' | |
285 | |/| |
|
289 | |/| | |
286 | o | 3: 'F' |
|
290 | o | 3: 'F' | |
287 | | | |
|
291 | | | | |
288 | | o 2: 'E' |
|
292 | | o 2: 'E' | |
289 | |/ |
|
293 | |/ | |
290 | | o 1: 'B' |
|
294 | | o 1: 'B' | |
291 | |/ |
|
295 | |/ | |
292 | o 0: 'A' |
|
296 | o 0: 'A' | |
293 |
|
297 | |||
294 | $ cd .. |
|
298 | $ cd .. | |
295 |
|
299 | |||
296 |
|
300 | |||
297 | Specify base and dest (from 1 onto 7): |
|
301 | Specify base and dest (from 1 onto 7): | |
298 |
|
302 | |||
299 | $ hg clone -q -u . a a8 |
|
303 | $ hg clone -q -u . a a8 | |
300 | $ cd a8 |
|
304 | $ cd a8 | |
301 |
|
305 | |||
302 | $ hg rebase --base 3 --dest 7 |
|
306 | $ hg rebase --base 3 --dest 7 | |
303 | saved backup bundle to $TESTTMP/a8/.hg/strip-backup/*-backup.hg (glob) |
|
307 | saved backup bundle to $TESTTMP/a8/.hg/strip-backup/*-backup.hg (glob) | |
304 |
|
308 | |||
305 | $ hg tglog |
|
309 | $ hg tglog | |
306 | @ 8: 'D' |
|
310 | @ 8: 'D' | |
307 | | |
|
311 | | | |
308 | o 7: 'C' |
|
312 | o 7: 'C' | |
309 | | |
|
313 | | | |
310 | o 6: 'B' |
|
314 | o 6: 'B' | |
311 | | |
|
315 | | | |
312 | | o 5: 'I' |
|
316 | | o 5: 'I' | |
313 | |/ |
|
317 | |/ | |
314 | o 4: 'H' |
|
318 | o 4: 'H' | |
315 | | |
|
319 | | | |
316 | | o 3: 'G' |
|
320 | | o 3: 'G' | |
317 | |/| |
|
321 | |/| | |
318 | o | 2: 'F' |
|
322 | o | 2: 'F' | |
319 | | | |
|
323 | | | | |
320 | | o 1: 'E' |
|
324 | | o 1: 'E' | |
321 | |/ |
|
325 | |/ | |
322 | o 0: 'A' |
|
326 | o 0: 'A' | |
323 |
|
327 | |||
324 | $ cd .. |
|
328 | $ cd .. | |
325 |
|
329 | |||
326 | Test --tool parameter: |
|
330 | Test --tool parameter: | |
327 |
|
331 | |||
328 | $ hg init b |
|
332 | $ hg init b | |
329 | $ cd b |
|
333 | $ cd b | |
330 |
|
334 | |||
331 | $ echo c1 > c1 |
|
335 | $ echo c1 > c1 | |
332 | $ hg ci -Am c1 |
|
336 | $ hg ci -Am c1 | |
333 | adding c1 |
|
337 | adding c1 | |
334 |
|
338 | |||
335 | $ echo c2 > c2 |
|
339 | $ echo c2 > c2 | |
336 | $ hg ci -Am c2 |
|
340 | $ hg ci -Am c2 | |
337 | adding c2 |
|
341 | adding c2 | |
338 |
|
342 | |||
339 | $ hg up -q 0 |
|
343 | $ hg up -q 0 | |
340 | $ echo c2b > c2 |
|
344 | $ echo c2b > c2 | |
341 | $ hg ci -Am c2b |
|
345 | $ hg ci -Am c2b | |
342 | adding c2 |
|
346 | adding c2 | |
343 | created new head |
|
347 | created new head | |
344 |
|
348 | |||
345 | $ cd .. |
|
349 | $ cd .. | |
346 |
|
350 | |||
347 | $ hg clone -q -u . b b1 |
|
351 | $ hg clone -q -u . b b1 | |
348 | $ cd b1 |
|
352 | $ cd b1 | |
349 |
|
353 | |||
350 | $ hg rebase -s 2 -d 1 --tool internal:local |
|
354 | $ hg rebase -s 2 -d 1 --tool internal:local | |
351 | saved backup bundle to $TESTTMP/b1/.hg/strip-backup/*-backup.hg (glob) |
|
355 | saved backup bundle to $TESTTMP/b1/.hg/strip-backup/*-backup.hg (glob) | |
352 |
|
356 | |||
353 | $ hg cat c2 |
|
357 | $ hg cat c2 | |
354 | c2 |
|
358 | c2 | |
355 |
|
359 | |||
356 | $ cd .. |
|
360 | $ cd .. | |
357 |
|
361 | |||
358 |
|
362 | |||
359 | $ hg clone -q -u . b b2 |
|
363 | $ hg clone -q -u . b b2 | |
360 | $ cd b2 |
|
364 | $ cd b2 | |
361 |
|
365 | |||
362 | $ hg rebase -s 2 -d 1 --tool internal:other |
|
366 | $ hg rebase -s 2 -d 1 --tool internal:other | |
363 | saved backup bundle to $TESTTMP/b2/.hg/strip-backup/*-backup.hg (glob) |
|
367 | saved backup bundle to $TESTTMP/b2/.hg/strip-backup/*-backup.hg (glob) | |
364 |
|
368 | |||
365 | $ hg cat c2 |
|
369 | $ hg cat c2 | |
366 | c2b |
|
370 | c2b | |
367 |
|
371 | |||
368 | $ cd .. |
|
372 | $ cd .. | |
369 |
|
373 | |||
370 |
|
374 | |||
371 | $ hg clone -q -u . b b3 |
|
375 | $ hg clone -q -u . b b3 | |
372 | $ cd b3 |
|
376 | $ cd b3 | |
373 |
|
377 | |||
374 | $ hg rebase -s 2 -d 1 --tool internal:fail |
|
378 | $ hg rebase -s 2 -d 1 --tool internal:fail | |
375 | abort: unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
379 | abort: unresolved conflicts (see hg resolve, then hg rebase --continue) | |
376 | [255] |
|
380 | [255] | |
377 |
|
381 | |||
378 | $ hg resolve -l |
|
382 | $ hg resolve -l | |
379 | U c2 |
|
383 | U c2 | |
380 |
|
384 | |||
381 | $ hg resolve -m c2 |
|
385 | $ hg resolve -m c2 | |
382 | $ hg rebase -c --tool internal:fail |
|
386 | $ hg rebase -c --tool internal:fail | |
383 | tool option will be ignored |
|
387 | tool option will be ignored | |
384 | saved backup bundle to $TESTTMP/b3/.hg/strip-backup/*-backup.hg (glob) |
|
388 | saved backup bundle to $TESTTMP/b3/.hg/strip-backup/*-backup.hg (glob) | |
385 |
|
389 |
General Comments 0
You need to be logged in to leave comments.
Login now