Show More
@@ -1,565 +1,578 b'' | |||||
1 | #require symlink execbit |
|
1 | #require symlink execbit | |
2 | $ cat << EOF >> $HGRCPATH |
|
2 | $ cat << EOF >> $HGRCPATH | |
3 | > [extensions] |
|
3 | > [extensions] | |
4 | > amend= |
|
4 | > amend= | |
5 | > rebase= |
|
5 | > rebase= | |
6 | > debugdrawdag=$TESTDIR/drawdag.py |
|
6 | > debugdrawdag=$TESTDIR/drawdag.py | |
7 | > strip= |
|
7 | > strip= | |
8 | > [rebase] |
|
8 | > [rebase] | |
9 | > experimental.inmemory=1 |
|
9 | > experimental.inmemory=1 | |
10 | > [diff] |
|
10 | > [diff] | |
11 | > git=1 |
|
11 | > git=1 | |
12 | > [alias] |
|
12 | > [alias] | |
13 | > tglog = log -G --template "{rev}: {node|short} '{desc}'\n" |
|
13 | > tglog = log -G --template "{rev}: {node|short} '{desc}'\n" | |
14 | > EOF |
|
14 | > EOF | |
15 |
|
15 | |||
16 | Rebase a simple DAG: |
|
16 | Rebase a simple DAG: | |
17 | $ hg init repo1 |
|
17 | $ hg init repo1 | |
18 | $ cd repo1 |
|
18 | $ cd repo1 | |
19 | $ hg debugdrawdag <<'EOS' |
|
19 | $ hg debugdrawdag <<'EOS' | |
20 | > c b |
|
20 | > c b | |
21 | > |/ |
|
21 | > |/ | |
22 | > d |
|
22 | > d | |
23 | > | |
|
23 | > | | |
24 | > a |
|
24 | > a | |
25 | > EOS |
|
25 | > EOS | |
26 | $ hg up -C a |
|
26 | $ hg up -C a | |
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
28 | $ hg tglog |
|
28 | $ hg tglog | |
29 | o 3: 814f6bd05178 'c' |
|
29 | o 3: 814f6bd05178 'c' | |
30 | | |
|
30 | | | |
31 | | o 2: db0e82a16a62 'b' |
|
31 | | o 2: db0e82a16a62 'b' | |
32 | |/ |
|
32 | |/ | |
33 | o 1: 02952614a83d 'd' |
|
33 | o 1: 02952614a83d 'd' | |
34 | | |
|
34 | | | |
35 | @ 0: b173517d0057 'a' |
|
35 | @ 0: b173517d0057 'a' | |
36 |
|
36 | |||
37 | $ hg cat -r 3 c |
|
37 | $ hg cat -r 3 c | |
38 | c (no-eol) |
|
38 | c (no-eol) | |
39 | $ hg cat -r 2 b |
|
39 | $ hg cat -r 2 b | |
40 | b (no-eol) |
|
40 | b (no-eol) | |
41 | $ hg rebase --debug -r b -d c | grep rebasing |
|
41 | $ hg rebase --debug -r b -d c | grep rebasing | |
42 | rebasing in-memory |
|
42 | rebasing in-memory | |
43 | rebasing 2:db0e82a16a62 "b" (b) |
|
43 | rebasing 2:db0e82a16a62 "b" (b) | |
44 | $ hg tglog |
|
44 | $ hg tglog | |
45 | o 3: ca58782ad1e4 'b' |
|
45 | o 3: ca58782ad1e4 'b' | |
46 | | |
|
46 | | | |
47 | o 2: 814f6bd05178 'c' |
|
47 | o 2: 814f6bd05178 'c' | |
48 | | |
|
48 | | | |
49 | o 1: 02952614a83d 'd' |
|
49 | o 1: 02952614a83d 'd' | |
50 | | |
|
50 | | | |
51 | @ 0: b173517d0057 'a' |
|
51 | @ 0: b173517d0057 'a' | |
52 |
|
52 | |||
53 | $ hg cat -r 3 b |
|
53 | $ hg cat -r 3 b | |
54 | b (no-eol) |
|
54 | b (no-eol) | |
55 | $ hg cat -r 2 c |
|
55 | $ hg cat -r 2 c | |
56 | c (no-eol) |
|
56 | c (no-eol) | |
57 |
|
57 | |||
58 | Case 2: |
|
58 | Case 2: | |
59 | $ hg init repo2 |
|
59 | $ hg init repo2 | |
60 | $ cd repo2 |
|
60 | $ cd repo2 | |
61 | $ hg debugdrawdag <<'EOS' |
|
61 | $ hg debugdrawdag <<'EOS' | |
62 | > c b |
|
62 | > c b | |
63 | > |/ |
|
63 | > |/ | |
64 | > d |
|
64 | > d | |
65 | > | |
|
65 | > | | |
66 | > a |
|
66 | > a | |
67 | > EOS |
|
67 | > EOS | |
68 |
|
68 | |||
69 | Add a symlink and executable file: |
|
69 | Add a symlink and executable file: | |
70 | $ hg up -C c |
|
70 | $ hg up -C c | |
71 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
71 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
72 | $ ln -s somefile e |
|
72 | $ ln -s somefile e | |
73 | $ echo f > f |
|
73 | $ echo f > f | |
74 | $ chmod +x f |
|
74 | $ chmod +x f | |
75 | $ hg add e f |
|
75 | $ hg add e f | |
76 | $ hg amend -q |
|
76 | $ hg amend -q | |
77 | $ hg up -Cq a |
|
77 | $ hg up -Cq a | |
78 |
|
78 | |||
79 | Write files to the working copy, and ensure they're still there after the rebase |
|
79 | Write files to the working copy, and ensure they're still there after the rebase | |
80 | $ echo "abc" > a |
|
80 | $ echo "abc" > a | |
81 | $ ln -s def b |
|
81 | $ ln -s def b | |
82 | $ echo "ghi" > c |
|
82 | $ echo "ghi" > c | |
83 | $ echo "jkl" > d |
|
83 | $ echo "jkl" > d | |
84 | $ echo "mno" > e |
|
84 | $ echo "mno" > e | |
85 | $ hg tglog |
|
85 | $ hg tglog | |
86 | o 3: f56b71190a8f 'c' |
|
86 | o 3: f56b71190a8f 'c' | |
87 | | |
|
87 | | | |
88 | | o 2: db0e82a16a62 'b' |
|
88 | | o 2: db0e82a16a62 'b' | |
89 | |/ |
|
89 | |/ | |
90 | o 1: 02952614a83d 'd' |
|
90 | o 1: 02952614a83d 'd' | |
91 | | |
|
91 | | | |
92 | @ 0: b173517d0057 'a' |
|
92 | @ 0: b173517d0057 'a' | |
93 |
|
93 | |||
94 | $ hg cat -r 3 c |
|
94 | $ hg cat -r 3 c | |
95 | c (no-eol) |
|
95 | c (no-eol) | |
96 | $ hg cat -r 2 b |
|
96 | $ hg cat -r 2 b | |
97 | b (no-eol) |
|
97 | b (no-eol) | |
98 | $ hg cat -r 3 e |
|
98 | $ hg cat -r 3 e | |
99 | somefile (no-eol) |
|
99 | somefile (no-eol) | |
100 | $ hg rebase --debug -s b -d a | grep rebasing |
|
100 | $ hg rebase --debug -s b -d a | grep rebasing | |
101 | rebasing in-memory |
|
101 | rebasing in-memory | |
102 | rebasing 2:db0e82a16a62 "b" (b) |
|
102 | rebasing 2:db0e82a16a62 "b" (b) | |
103 | $ hg tglog |
|
103 | $ hg tglog | |
104 | o 3: fc055c3b4d33 'b' |
|
104 | o 3: fc055c3b4d33 'b' | |
105 | | |
|
105 | | | |
106 | | o 2: f56b71190a8f 'c' |
|
106 | | o 2: f56b71190a8f 'c' | |
107 | | | |
|
107 | | | | |
108 | | o 1: 02952614a83d 'd' |
|
108 | | o 1: 02952614a83d 'd' | |
109 | |/ |
|
109 | |/ | |
110 | @ 0: b173517d0057 'a' |
|
110 | @ 0: b173517d0057 'a' | |
111 |
|
111 | |||
112 | $ hg cat -r 2 c |
|
112 | $ hg cat -r 2 c | |
113 | c (no-eol) |
|
113 | c (no-eol) | |
114 | $ hg cat -r 3 b |
|
114 | $ hg cat -r 3 b | |
115 | b (no-eol) |
|
115 | b (no-eol) | |
116 | $ hg rebase --debug -s 1 -d 3 | grep rebasing |
|
116 | $ hg rebase --debug -s 1 -d 3 | grep rebasing | |
117 | rebasing in-memory |
|
117 | rebasing in-memory | |
118 | rebasing 1:02952614a83d "d" (d) |
|
118 | rebasing 1:02952614a83d "d" (d) | |
119 | rebasing 2:f56b71190a8f "c" |
|
119 | rebasing 2:f56b71190a8f "c" | |
120 | $ hg tglog |
|
120 | $ hg tglog | |
121 | o 3: 753feb6fd12a 'c' |
|
121 | o 3: 753feb6fd12a 'c' | |
122 | | |
|
122 | | | |
123 | o 2: 09c044d2cb43 'd' |
|
123 | o 2: 09c044d2cb43 'd' | |
124 | | |
|
124 | | | |
125 | o 1: fc055c3b4d33 'b' |
|
125 | o 1: fc055c3b4d33 'b' | |
126 | | |
|
126 | | | |
127 | @ 0: b173517d0057 'a' |
|
127 | @ 0: b173517d0057 'a' | |
128 |
|
128 | |||
129 | Ensure working copy files are still there: |
|
129 | Ensure working copy files are still there: | |
130 | $ cat a |
|
130 | $ cat a | |
131 | abc |
|
131 | abc | |
132 | $ readlink.py b |
|
132 | $ readlink.py b | |
133 | b -> def |
|
133 | b -> def | |
134 | $ cat e |
|
134 | $ cat e | |
135 | mno |
|
135 | mno | |
136 |
|
136 | |||
137 | Ensure symlink and executable files were rebased properly: |
|
137 | Ensure symlink and executable files were rebased properly: | |
138 | $ hg up -Cq 3 |
|
138 | $ hg up -Cq 3 | |
139 | $ readlink.py e |
|
139 | $ readlink.py e | |
140 | e -> somefile |
|
140 | e -> somefile | |
141 | $ ls -l f | cut -c -10 |
|
141 | $ ls -l f | cut -c -10 | |
142 | -rwxr-xr-x |
|
142 | -rwxr-xr-x | |
143 |
|
143 | |||
144 | Rebase the working copy parent |
|
144 | Rebase the working copy parent | |
145 | $ hg up -C 3 |
|
145 | $ hg up -C 3 | |
146 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
146 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
147 | $ hg rebase -r 3 -d 0 --debug | grep rebasing |
|
147 | $ hg rebase -r 3 -d 0 --debug | grep rebasing | |
148 | rebasing in-memory |
|
148 | rebasing in-memory | |
149 | rebasing 3:753feb6fd12a "c" (tip) |
|
149 | rebasing 3:753feb6fd12a "c" (tip) | |
150 | $ hg tglog |
|
150 | $ hg tglog | |
151 | @ 3: 844a7de3e617 'c' |
|
151 | @ 3: 844a7de3e617 'c' | |
152 | | |
|
152 | | | |
153 | | o 2: 09c044d2cb43 'd' |
|
153 | | o 2: 09c044d2cb43 'd' | |
154 | | | |
|
154 | | | | |
155 | | o 1: fc055c3b4d33 'b' |
|
155 | | o 1: fc055c3b4d33 'b' | |
156 | |/ |
|
156 | |/ | |
157 | o 0: b173517d0057 'a' |
|
157 | o 0: b173517d0057 'a' | |
158 |
|
158 | |||
159 |
|
159 | |||
160 | Test reporting of path conflicts |
|
160 | Test reporting of path conflicts | |
161 |
|
161 | |||
162 | $ hg rm a |
|
162 | $ hg rm a | |
163 | $ mkdir a |
|
163 | $ mkdir a | |
164 | $ touch a/a |
|
164 | $ touch a/a | |
165 | $ hg ci -Am "a/a" |
|
165 | $ hg ci -Am "a/a" | |
166 | adding a/a |
|
166 | adding a/a | |
167 | $ hg tglog |
|
167 | $ hg tglog | |
168 | @ 4: daf7dfc139cb 'a/a' |
|
168 | @ 4: daf7dfc139cb 'a/a' | |
169 | | |
|
169 | | | |
170 | o 3: 844a7de3e617 'c' |
|
170 | o 3: 844a7de3e617 'c' | |
171 | | |
|
171 | | | |
172 | | o 2: 09c044d2cb43 'd' |
|
172 | | o 2: 09c044d2cb43 'd' | |
173 | | | |
|
173 | | | | |
174 | | o 1: fc055c3b4d33 'b' |
|
174 | | o 1: fc055c3b4d33 'b' | |
175 | |/ |
|
175 | |/ | |
176 | o 0: b173517d0057 'a' |
|
176 | o 0: b173517d0057 'a' | |
177 |
|
177 | |||
178 | $ hg rebase -r . -d 2 |
|
178 | $ hg rebase -r . -d 2 | |
179 | rebasing 4:daf7dfc139cb "a/a" (tip) |
|
179 | rebasing 4:daf7dfc139cb "a/a" (tip) | |
180 | saved backup bundle to $TESTTMP/repo1/repo2/.hg/strip-backup/daf7dfc139cb-fdbfcf4f-rebase.hg |
|
180 | saved backup bundle to $TESTTMP/repo1/repo2/.hg/strip-backup/daf7dfc139cb-fdbfcf4f-rebase.hg | |
181 |
|
181 | |||
182 | $ cd .. |
|
182 | $ cd .. | |
183 |
|
183 | |||
184 | Test dry-run rebasing |
|
184 | Test dry-run rebasing | |
185 |
|
185 | |||
186 | $ hg init repo3 |
|
186 | $ hg init repo3 | |
187 | $ cd repo3 |
|
187 | $ cd repo3 | |
188 | $ echo a>a |
|
188 | $ echo a>a | |
189 | $ hg ci -Aqma |
|
189 | $ hg ci -Aqma | |
190 | $ echo b>b |
|
190 | $ echo b>b | |
191 | $ hg ci -Aqmb |
|
191 | $ hg ci -Aqmb | |
192 | $ echo c>c |
|
192 | $ echo c>c | |
193 | $ hg ci -Aqmc |
|
193 | $ hg ci -Aqmc | |
194 | $ echo d>d |
|
194 | $ echo d>d | |
195 | $ hg ci -Aqmd |
|
195 | $ hg ci -Aqmd | |
196 | $ echo e>e |
|
196 | $ echo e>e | |
197 | $ hg ci -Aqme |
|
197 | $ hg ci -Aqme | |
198 |
|
198 | |||
199 | $ hg up 1 -q |
|
199 | $ hg up 1 -q | |
200 | $ echo f>f |
|
200 | $ echo f>f | |
201 | $ hg ci -Amf |
|
201 | $ hg ci -Amf | |
202 | adding f |
|
202 | adding f | |
203 | created new head |
|
203 | created new head | |
204 | $ echo g>g |
|
204 | $ echo g>g | |
205 | $ hg ci -Aqmg |
|
205 | $ hg ci -Aqmg | |
206 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
206 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
207 | @ 6:baf10c5166d4 test |
|
207 | @ 6:baf10c5166d4 test | |
208 | | g |
|
208 | | g | |
209 | | |
|
209 | | | |
210 | o 5:6343ca3eff20 test |
|
210 | o 5:6343ca3eff20 test | |
211 | | f |
|
211 | | f | |
212 | | |
|
212 | | | |
213 | | o 4:e860deea161a test |
|
213 | | o 4:e860deea161a test | |
214 | | | e |
|
214 | | | e | |
215 | | | |
|
215 | | | | |
216 | | o 3:055a42cdd887 test |
|
216 | | o 3:055a42cdd887 test | |
217 | | | d |
|
217 | | | d | |
218 | | | |
|
218 | | | | |
219 | | o 2:177f92b77385 test |
|
219 | | o 2:177f92b77385 test | |
220 | |/ c |
|
220 | |/ c | |
221 | | |
|
221 | | | |
222 | o 1:d2ae7f538514 test |
|
222 | o 1:d2ae7f538514 test | |
223 | | b |
|
223 | | b | |
224 | | |
|
224 | | | |
225 | o 0:cb9a9f314b8b test |
|
225 | o 0:cb9a9f314b8b test | |
226 | a |
|
226 | a | |
227 |
|
227 | |||
228 | Make sure it throws error while passing --continue or --abort with --dry-run |
|
228 | Make sure it throws error while passing --continue or --abort with --dry-run | |
229 | $ hg rebase -s 2 -d 6 -n --continue |
|
229 | $ hg rebase -s 2 -d 6 -n --continue | |
230 | abort: cannot specify both --dry-run and --continue |
|
230 | abort: cannot specify both --dry-run and --continue | |
231 | [255] |
|
231 | [255] | |
232 | $ hg rebase -s 2 -d 6 -n --abort |
|
232 | $ hg rebase -s 2 -d 6 -n --abort | |
233 | abort: cannot specify both --dry-run and --abort |
|
233 | abort: cannot specify both --dry-run and --abort | |
234 | [255] |
|
234 | [255] | |
235 |
|
235 | |||
236 | Check dryrun gives correct results when there is no conflict in rebasing |
|
236 | Check dryrun gives correct results when there is no conflict in rebasing | |
237 | $ hg rebase -s 2 -d 6 -n |
|
237 | $ hg rebase -s 2 -d 6 -n | |
238 | starting dry-run rebase; repository will not be changed |
|
238 | starting dry-run rebase; repository will not be changed | |
239 | rebasing 2:177f92b77385 "c" |
|
239 | rebasing 2:177f92b77385 "c" | |
240 | rebasing 3:055a42cdd887 "d" |
|
240 | rebasing 3:055a42cdd887 "d" | |
241 | rebasing 4:e860deea161a "e" |
|
241 | rebasing 4:e860deea161a "e" | |
242 | dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase |
|
242 | dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase | |
243 |
|
243 | |||
244 | $ hg diff |
|
244 | $ hg diff | |
245 | $ hg status |
|
245 | $ hg status | |
246 |
|
246 | |||
247 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
247 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
248 | @ 6:baf10c5166d4 test |
|
248 | @ 6:baf10c5166d4 test | |
249 | | g |
|
249 | | g | |
250 | | |
|
250 | | | |
251 | o 5:6343ca3eff20 test |
|
251 | o 5:6343ca3eff20 test | |
252 | | f |
|
252 | | f | |
253 | | |
|
253 | | | |
254 | | o 4:e860deea161a test |
|
254 | | o 4:e860deea161a test | |
255 | | | e |
|
255 | | | e | |
256 | | | |
|
256 | | | | |
257 | | o 3:055a42cdd887 test |
|
257 | | o 3:055a42cdd887 test | |
258 | | | d |
|
258 | | | d | |
259 | | | |
|
259 | | | | |
260 | | o 2:177f92b77385 test |
|
260 | | o 2:177f92b77385 test | |
261 | |/ c |
|
261 | |/ c | |
262 | | |
|
262 | | | |
263 | o 1:d2ae7f538514 test |
|
263 | o 1:d2ae7f538514 test | |
264 | | b |
|
264 | | b | |
265 | | |
|
265 | | | |
266 | o 0:cb9a9f314b8b test |
|
266 | o 0:cb9a9f314b8b test | |
267 | a |
|
267 | a | |
268 |
|
268 | |||
269 | Check dryrun working with --collapse when there is no conflict |
|
269 | Check dryrun working with --collapse when there is no conflict | |
270 | $ hg rebase -s 2 -d 6 -n --collapse |
|
270 | $ hg rebase -s 2 -d 6 -n --collapse | |
271 | starting dry-run rebase; repository will not be changed |
|
271 | starting dry-run rebase; repository will not be changed | |
272 | rebasing 2:177f92b77385 "c" |
|
272 | rebasing 2:177f92b77385 "c" | |
273 | rebasing 3:055a42cdd887 "d" |
|
273 | rebasing 3:055a42cdd887 "d" | |
274 | rebasing 4:e860deea161a "e" |
|
274 | rebasing 4:e860deea161a "e" | |
275 | dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase |
|
275 | dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase | |
276 |
|
276 | |||
277 | Check dryrun gives correct results when there is conflict in rebasing |
|
277 | Check dryrun gives correct results when there is conflict in rebasing | |
278 | Make a conflict: |
|
278 | Make a conflict: | |
279 | $ hg up 6 -q |
|
279 | $ hg up 6 -q | |
280 | $ echo conflict>e |
|
280 | $ echo conflict>e | |
281 | $ hg ci -Aqm "conflict with e" |
|
281 | $ hg ci -Aqm "conflict with e" | |
282 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
282 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
283 | @ 7:d2c195b28050 test |
|
283 | @ 7:d2c195b28050 test | |
284 | | conflict with e |
|
284 | | conflict with e | |
285 | | |
|
285 | | | |
286 | o 6:baf10c5166d4 test |
|
286 | o 6:baf10c5166d4 test | |
287 | | g |
|
287 | | g | |
288 | | |
|
288 | | | |
289 | o 5:6343ca3eff20 test |
|
289 | o 5:6343ca3eff20 test | |
290 | | f |
|
290 | | f | |
291 | | |
|
291 | | | |
292 | | o 4:e860deea161a test |
|
292 | | o 4:e860deea161a test | |
293 | | | e |
|
293 | | | e | |
294 | | | |
|
294 | | | | |
295 | | o 3:055a42cdd887 test |
|
295 | | o 3:055a42cdd887 test | |
296 | | | d |
|
296 | | | d | |
297 | | | |
|
297 | | | | |
298 | | o 2:177f92b77385 test |
|
298 | | o 2:177f92b77385 test | |
299 | |/ c |
|
299 | |/ c | |
300 | | |
|
300 | | | |
301 | o 1:d2ae7f538514 test |
|
301 | o 1:d2ae7f538514 test | |
302 | | b |
|
302 | | b | |
303 | | |
|
303 | | | |
304 | o 0:cb9a9f314b8b test |
|
304 | o 0:cb9a9f314b8b test | |
305 | a |
|
305 | a | |
306 |
|
306 | |||
307 | $ hg rebase -s 2 -d 7 -n |
|
307 | $ hg rebase -s 2 -d 7 -n | |
308 | starting dry-run rebase; repository will not be changed |
|
308 | starting dry-run rebase; repository will not be changed | |
309 | rebasing 2:177f92b77385 "c" |
|
309 | rebasing 2:177f92b77385 "c" | |
310 | rebasing 3:055a42cdd887 "d" |
|
310 | rebasing 3:055a42cdd887 "d" | |
311 | rebasing 4:e860deea161a "e" |
|
311 | rebasing 4:e860deea161a "e" | |
312 | merging e |
|
312 | merging e | |
313 | transaction abort! |
|
313 | transaction abort! | |
314 | rollback completed |
|
314 | rollback completed | |
315 | hit a merge conflict |
|
315 | hit a merge conflict | |
316 | [1] |
|
316 | [1] | |
317 | $ hg diff |
|
317 | $ hg diff | |
318 | $ hg status |
|
318 | $ hg status | |
319 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
319 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
320 | @ 7:d2c195b28050 test |
|
320 | @ 7:d2c195b28050 test | |
321 | | conflict with e |
|
321 | | conflict with e | |
322 | | |
|
322 | | | |
323 | o 6:baf10c5166d4 test |
|
323 | o 6:baf10c5166d4 test | |
324 | | g |
|
324 | | g | |
325 | | |
|
325 | | | |
326 | o 5:6343ca3eff20 test |
|
326 | o 5:6343ca3eff20 test | |
327 | | f |
|
327 | | f | |
328 | | |
|
328 | | | |
329 | | o 4:e860deea161a test |
|
329 | | o 4:e860deea161a test | |
330 | | | e |
|
330 | | | e | |
331 | | | |
|
331 | | | | |
332 | | o 3:055a42cdd887 test |
|
332 | | o 3:055a42cdd887 test | |
333 | | | d |
|
333 | | | d | |
334 | | | |
|
334 | | | | |
335 | | o 2:177f92b77385 test |
|
335 | | o 2:177f92b77385 test | |
336 | |/ c |
|
336 | |/ c | |
337 | | |
|
337 | | | |
338 | o 1:d2ae7f538514 test |
|
338 | o 1:d2ae7f538514 test | |
339 | | b |
|
339 | | b | |
340 | | |
|
340 | | | |
341 | o 0:cb9a9f314b8b test |
|
341 | o 0:cb9a9f314b8b test | |
342 | a |
|
342 | a | |
343 |
|
343 | |||
344 | Check dryrun working with --collapse when there is conflicts |
|
344 | Check dryrun working with --collapse when there is conflicts | |
345 | $ hg rebase -s 2 -d 7 -n --collapse |
|
345 | $ hg rebase -s 2 -d 7 -n --collapse | |
346 | starting dry-run rebase; repository will not be changed |
|
346 | starting dry-run rebase; repository will not be changed | |
347 | rebasing 2:177f92b77385 "c" |
|
347 | rebasing 2:177f92b77385 "c" | |
348 | rebasing 3:055a42cdd887 "d" |
|
348 | rebasing 3:055a42cdd887 "d" | |
349 | rebasing 4:e860deea161a "e" |
|
349 | rebasing 4:e860deea161a "e" | |
350 | merging e |
|
350 | merging e | |
351 | hit a merge conflict |
|
351 | hit a merge conflict | |
352 | [1] |
|
352 | [1] | |
353 |
|
353 | |||
|
354 | In-memory rebase that fails due to merge conflicts | |||
|
355 | ||||
|
356 | $ hg rebase -s 2 -d 7 | |||
|
357 | rebasing 2:177f92b77385 "c" | |||
|
358 | rebasing 3:055a42cdd887 "d" | |||
|
359 | rebasing 4:e860deea161a "e" | |||
|
360 | merging e | |||
|
361 | transaction abort! | |||
|
362 | rollback completed | |||
|
363 | hit merge conflicts; re-running rebase without in-memory merge | |||
|
364 | abort: abort and continue do not allow specifying revisions | |||
|
365 | [255] | |||
|
366 | ||||
354 | ========================== |
|
367 | ========================== | |
355 | Test for --confirm option| |
|
368 | Test for --confirm option| | |
356 | ========================== |
|
369 | ========================== | |
357 | $ cd .. |
|
370 | $ cd .. | |
358 | $ hg clone repo3 repo4 -q |
|
371 | $ hg clone repo3 repo4 -q | |
359 | $ cd repo4 |
|
372 | $ cd repo4 | |
360 | $ hg strip 7 -q |
|
373 | $ hg strip 7 -q | |
361 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
374 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
362 | @ 6:baf10c5166d4 test |
|
375 | @ 6:baf10c5166d4 test | |
363 | | g |
|
376 | | g | |
364 | | |
|
377 | | | |
365 | o 5:6343ca3eff20 test |
|
378 | o 5:6343ca3eff20 test | |
366 | | f |
|
379 | | f | |
367 | | |
|
380 | | | |
368 | | o 4:e860deea161a test |
|
381 | | o 4:e860deea161a test | |
369 | | | e |
|
382 | | | e | |
370 | | | |
|
383 | | | | |
371 | | o 3:055a42cdd887 test |
|
384 | | o 3:055a42cdd887 test | |
372 | | | d |
|
385 | | | d | |
373 | | | |
|
386 | | | | |
374 | | o 2:177f92b77385 test |
|
387 | | o 2:177f92b77385 test | |
375 | |/ c |
|
388 | |/ c | |
376 | | |
|
389 | | | |
377 | o 1:d2ae7f538514 test |
|
390 | o 1:d2ae7f538514 test | |
378 | | b |
|
391 | | b | |
379 | | |
|
392 | | | |
380 | o 0:cb9a9f314b8b test |
|
393 | o 0:cb9a9f314b8b test | |
381 | a |
|
394 | a | |
382 |
|
395 | |||
383 | Check it gives error when both --dryrun and --confirm is used: |
|
396 | Check it gives error when both --dryrun and --confirm is used: | |
384 | $ hg rebase -s 2 -d . --confirm --dry-run |
|
397 | $ hg rebase -s 2 -d . --confirm --dry-run | |
385 | abort: cannot specify both --confirm and --dry-run |
|
398 | abort: cannot specify both --confirm and --dry-run | |
386 | [255] |
|
399 | [255] | |
387 | $ hg rebase -s 2 -d . --confirm --abort |
|
400 | $ hg rebase -s 2 -d . --confirm --abort | |
388 | abort: cannot specify both --confirm and --abort |
|
401 | abort: cannot specify both --confirm and --abort | |
389 | [255] |
|
402 | [255] | |
390 | $ hg rebase -s 2 -d . --confirm --continue |
|
403 | $ hg rebase -s 2 -d . --confirm --continue | |
391 | abort: cannot specify both --confirm and --continue |
|
404 | abort: cannot specify both --confirm and --continue | |
392 | [255] |
|
405 | [255] | |
393 |
|
406 | |||
394 | Test --confirm option when there are no conflicts: |
|
407 | Test --confirm option when there are no conflicts: | |
395 | $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF |
|
408 | $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF | |
396 | > n |
|
409 | > n | |
397 | > EOF |
|
410 | > EOF | |
398 | starting in-memory rebase |
|
411 | starting in-memory rebase | |
399 | rebasing 2:177f92b77385 "c" |
|
412 | rebasing 2:177f92b77385 "c" | |
400 | rebasing 3:055a42cdd887 "d" |
|
413 | rebasing 3:055a42cdd887 "d" | |
401 | rebasing 4:e860deea161a "e" |
|
414 | rebasing 4:e860deea161a "e" | |
402 | rebase completed successfully |
|
415 | rebase completed successfully | |
403 | apply changes (yn)? n |
|
416 | apply changes (yn)? n | |
404 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
417 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
405 | @ 6:baf10c5166d4 test |
|
418 | @ 6:baf10c5166d4 test | |
406 | | g |
|
419 | | g | |
407 | | |
|
420 | | | |
408 | o 5:6343ca3eff20 test |
|
421 | o 5:6343ca3eff20 test | |
409 | | f |
|
422 | | f | |
410 | | |
|
423 | | | |
411 | | o 4:e860deea161a test |
|
424 | | o 4:e860deea161a test | |
412 | | | e |
|
425 | | | e | |
413 | | | |
|
426 | | | | |
414 | | o 3:055a42cdd887 test |
|
427 | | o 3:055a42cdd887 test | |
415 | | | d |
|
428 | | | d | |
416 | | | |
|
429 | | | | |
417 | | o 2:177f92b77385 test |
|
430 | | o 2:177f92b77385 test | |
418 | |/ c |
|
431 | |/ c | |
419 | | |
|
432 | | | |
420 | o 1:d2ae7f538514 test |
|
433 | o 1:d2ae7f538514 test | |
421 | | b |
|
434 | | b | |
422 | | |
|
435 | | | |
423 | o 0:cb9a9f314b8b test |
|
436 | o 0:cb9a9f314b8b test | |
424 | a |
|
437 | a | |
425 |
|
438 | |||
426 | $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF |
|
439 | $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF | |
427 | > y |
|
440 | > y | |
428 | > EOF |
|
441 | > EOF | |
429 | starting in-memory rebase |
|
442 | starting in-memory rebase | |
430 | rebasing 2:177f92b77385 "c" |
|
443 | rebasing 2:177f92b77385 "c" | |
431 | rebasing 3:055a42cdd887 "d" |
|
444 | rebasing 3:055a42cdd887 "d" | |
432 | rebasing 4:e860deea161a "e" |
|
445 | rebasing 4:e860deea161a "e" | |
433 | rebase completed successfully |
|
446 | rebase completed successfully | |
434 | apply changes (yn)? y |
|
447 | apply changes (yn)? y | |
435 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
448 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
436 | o 9:9fd28f55f6dc test |
|
449 | o 9:9fd28f55f6dc test | |
437 | | e |
|
450 | | e | |
438 | | |
|
451 | | | |
439 | o 8:12cbf031f469 test |
|
452 | o 8:12cbf031f469 test | |
440 | | d |
|
453 | | d | |
441 | | |
|
454 | | | |
442 | o 7:c83b1da5b1ae test |
|
455 | o 7:c83b1da5b1ae test | |
443 | | c |
|
456 | | c | |
444 | | |
|
457 | | | |
445 | @ 6:baf10c5166d4 test |
|
458 | @ 6:baf10c5166d4 test | |
446 | | g |
|
459 | | g | |
447 | | |
|
460 | | | |
448 | o 5:6343ca3eff20 test |
|
461 | o 5:6343ca3eff20 test | |
449 | | f |
|
462 | | f | |
450 | | |
|
463 | | | |
451 | | o 4:e860deea161a test |
|
464 | | o 4:e860deea161a test | |
452 | | | e |
|
465 | | | e | |
453 | | | |
|
466 | | | | |
454 | | o 3:055a42cdd887 test |
|
467 | | o 3:055a42cdd887 test | |
455 | | | d |
|
468 | | | d | |
456 | | | |
|
469 | | | | |
457 | | o 2:177f92b77385 test |
|
470 | | o 2:177f92b77385 test | |
458 | |/ c |
|
471 | |/ c | |
459 | | |
|
472 | | | |
460 | o 1:d2ae7f538514 test |
|
473 | o 1:d2ae7f538514 test | |
461 | | b |
|
474 | | b | |
462 | | |
|
475 | | | |
463 | o 0:cb9a9f314b8b test |
|
476 | o 0:cb9a9f314b8b test | |
464 | a |
|
477 | a | |
465 |
|
478 | |||
466 | Test --confirm option when there is a conflict |
|
479 | Test --confirm option when there is a conflict | |
467 | $ hg up tip -q |
|
480 | $ hg up tip -q | |
468 | $ echo ee>e |
|
481 | $ echo ee>e | |
469 | $ hg ci --amend -m "conflict with e" -q |
|
482 | $ hg ci --amend -m "conflict with e" -q | |
470 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
483 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
471 | @ 9:906d72f66a59 test |
|
484 | @ 9:906d72f66a59 test | |
472 | | conflict with e |
|
485 | | conflict with e | |
473 | | |
|
486 | | | |
474 | o 8:12cbf031f469 test |
|
487 | o 8:12cbf031f469 test | |
475 | | d |
|
488 | | d | |
476 | | |
|
489 | | | |
477 | o 7:c83b1da5b1ae test |
|
490 | o 7:c83b1da5b1ae test | |
478 | | c |
|
491 | | c | |
479 | | |
|
492 | | | |
480 | o 6:baf10c5166d4 test |
|
493 | o 6:baf10c5166d4 test | |
481 | | g |
|
494 | | g | |
482 | | |
|
495 | | | |
483 | o 5:6343ca3eff20 test |
|
496 | o 5:6343ca3eff20 test | |
484 | | f |
|
497 | | f | |
485 | | |
|
498 | | | |
486 | | o 4:e860deea161a test |
|
499 | | o 4:e860deea161a test | |
487 | | | e |
|
500 | | | e | |
488 | | | |
|
501 | | | | |
489 | | o 3:055a42cdd887 test |
|
502 | | o 3:055a42cdd887 test | |
490 | | | d |
|
503 | | | d | |
491 | | | |
|
504 | | | | |
492 | | o 2:177f92b77385 test |
|
505 | | o 2:177f92b77385 test | |
493 | |/ c |
|
506 | |/ c | |
494 | | |
|
507 | | | |
495 | o 1:d2ae7f538514 test |
|
508 | o 1:d2ae7f538514 test | |
496 | | b |
|
509 | | b | |
497 | | |
|
510 | | | |
498 | o 0:cb9a9f314b8b test |
|
511 | o 0:cb9a9f314b8b test | |
499 | a |
|
512 | a | |
500 |
|
513 | |||
501 | $ hg rebase -s 4 -d . --keep --confirm |
|
514 | $ hg rebase -s 4 -d . --keep --confirm | |
502 | starting in-memory rebase |
|
515 | starting in-memory rebase | |
503 | rebasing 4:e860deea161a "e" |
|
516 | rebasing 4:e860deea161a "e" | |
504 | merging e |
|
517 | merging e | |
505 | hit a merge conflict |
|
518 | hit a merge conflict | |
506 | [1] |
|
519 | [1] | |
507 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
520 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
508 | @ 9:906d72f66a59 test |
|
521 | @ 9:906d72f66a59 test | |
509 | | conflict with e |
|
522 | | conflict with e | |
510 | | |
|
523 | | | |
511 | o 8:12cbf031f469 test |
|
524 | o 8:12cbf031f469 test | |
512 | | d |
|
525 | | d | |
513 | | |
|
526 | | | |
514 | o 7:c83b1da5b1ae test |
|
527 | o 7:c83b1da5b1ae test | |
515 | | c |
|
528 | | c | |
516 | | |
|
529 | | | |
517 | o 6:baf10c5166d4 test |
|
530 | o 6:baf10c5166d4 test | |
518 | | g |
|
531 | | g | |
519 | | |
|
532 | | | |
520 | o 5:6343ca3eff20 test |
|
533 | o 5:6343ca3eff20 test | |
521 | | f |
|
534 | | f | |
522 | | |
|
535 | | | |
523 | | o 4:e860deea161a test |
|
536 | | o 4:e860deea161a test | |
524 | | | e |
|
537 | | | e | |
525 | | | |
|
538 | | | | |
526 | | o 3:055a42cdd887 test |
|
539 | | o 3:055a42cdd887 test | |
527 | | | d |
|
540 | | | d | |
528 | | | |
|
541 | | | | |
529 | | o 2:177f92b77385 test |
|
542 | | o 2:177f92b77385 test | |
530 | |/ c |
|
543 | |/ c | |
531 | | |
|
544 | | | |
532 | o 1:d2ae7f538514 test |
|
545 | o 1:d2ae7f538514 test | |
533 | | b |
|
546 | | b | |
534 | | |
|
547 | | | |
535 | o 0:cb9a9f314b8b test |
|
548 | o 0:cb9a9f314b8b test | |
536 | a |
|
549 | a | |
537 |
|
550 | |||
538 | #if execbit |
|
551 | #if execbit | |
539 |
|
552 | |||
540 | Test a metadata-only in-memory merge |
|
553 | Test a metadata-only in-memory merge | |
541 | $ cd $TESTTMP |
|
554 | $ cd $TESTTMP | |
542 | $ hg init no_exception |
|
555 | $ hg init no_exception | |
543 | $ cd no_exception |
|
556 | $ cd no_exception | |
544 | # Produce the following graph: |
|
557 | # Produce the following graph: | |
545 | # o 'add +x to foo.txt' |
|
558 | # o 'add +x to foo.txt' | |
546 | # | o r1 (adds bar.txt, just for something to rebase to) |
|
559 | # | o r1 (adds bar.txt, just for something to rebase to) | |
547 | # |/ |
|
560 | # |/ | |
548 | # o r0 (adds foo.txt, no +x) |
|
561 | # o r0 (adds foo.txt, no +x) | |
549 | $ echo hi > foo.txt |
|
562 | $ echo hi > foo.txt | |
550 | $ hg ci -qAm r0 |
|
563 | $ hg ci -qAm r0 | |
551 | $ echo hi > bar.txt |
|
564 | $ echo hi > bar.txt | |
552 | $ hg ci -qAm r1 |
|
565 | $ hg ci -qAm r1 | |
553 | $ hg co -qr ".^" |
|
566 | $ hg co -qr ".^" | |
554 | $ chmod +x foo.txt |
|
567 | $ chmod +x foo.txt | |
555 | $ hg ci -qAm 'add +x to foo.txt' |
|
568 | $ hg ci -qAm 'add +x to foo.txt' | |
556 | issue5960: this was raising an AttributeError exception |
|
569 | issue5960: this was raising an AttributeError exception | |
557 | $ hg rebase -r . -d 1 |
|
570 | $ hg rebase -r . -d 1 | |
558 | rebasing 2:539b93e77479 "add +x to foo.txt" (tip) |
|
571 | rebasing 2:539b93e77479 "add +x to foo.txt" (tip) | |
559 | saved backup bundle to $TESTTMP/no_exception/.hg/strip-backup/*.hg (glob) |
|
572 | saved backup bundle to $TESTTMP/no_exception/.hg/strip-backup/*.hg (glob) | |
560 | $ hg diff -c tip |
|
573 | $ hg diff -c tip | |
561 | diff --git a/foo.txt b/foo.txt |
|
574 | diff --git a/foo.txt b/foo.txt | |
562 | old mode 100644 |
|
575 | old mode 100644 | |
563 | new mode 100755 |
|
576 | new mode 100755 | |
564 |
|
577 | |||
565 | #endif |
|
578 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now