##// END OF EJS Templates
tests: demonstrate crash when rebasing across copy with --collapse...
Martin von Zweigbergk -
r42508:70845eb6 default
parent child Browse files
Show More
@@ -1,826 +1,845 b''
1 #require symlink execbit
1 #require symlink execbit
2 $ cat << EOF >> $HGRCPATH
2 $ cat << EOF >> $HGRCPATH
3 > [phases]
3 > [phases]
4 > publish=False
4 > publish=False
5 > [extensions]
5 > [extensions]
6 > amend=
6 > amend=
7 > rebase=
7 > rebase=
8 > debugdrawdag=$TESTDIR/drawdag.py
8 > debugdrawdag=$TESTDIR/drawdag.py
9 > strip=
9 > strip=
10 > [rebase]
10 > [rebase]
11 > experimental.inmemory=1
11 > experimental.inmemory=1
12 > [diff]
12 > [diff]
13 > git=1
13 > git=1
14 > [alias]
14 > [alias]
15 > tglog = log -G --template "{rev}: {node|short} '{desc}'\n"
15 > tglog = log -G --template "{rev}: {node|short} '{desc}'\n"
16 > EOF
16 > EOF
17
17
18 Rebase a simple DAG:
18 Rebase a simple DAG:
19 $ hg init repo1
19 $ hg init repo1
20 $ cd repo1
20 $ cd repo1
21 $ hg debugdrawdag <<'EOS'
21 $ hg debugdrawdag <<'EOS'
22 > c b
22 > c b
23 > |/
23 > |/
24 > d
24 > d
25 > |
25 > |
26 > a
26 > a
27 > EOS
27 > EOS
28 $ hg up -C a
28 $ hg up -C a
29 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
30 $ hg tglog
30 $ hg tglog
31 o 3: 814f6bd05178 'c'
31 o 3: 814f6bd05178 'c'
32 |
32 |
33 | o 2: db0e82a16a62 'b'
33 | o 2: db0e82a16a62 'b'
34 |/
34 |/
35 o 1: 02952614a83d 'd'
35 o 1: 02952614a83d 'd'
36 |
36 |
37 @ 0: b173517d0057 'a'
37 @ 0: b173517d0057 'a'
38
38
39 $ hg cat -r 3 c
39 $ hg cat -r 3 c
40 c (no-eol)
40 c (no-eol)
41 $ hg cat -r 2 b
41 $ hg cat -r 2 b
42 b (no-eol)
42 b (no-eol)
43 $ hg rebase --debug -r b -d c | grep rebasing
43 $ hg rebase --debug -r b -d c | grep rebasing
44 rebasing in-memory
44 rebasing in-memory
45 rebasing 2:db0e82a16a62 "b" (b)
45 rebasing 2:db0e82a16a62 "b" (b)
46 $ hg tglog
46 $ hg tglog
47 o 3: ca58782ad1e4 'b'
47 o 3: ca58782ad1e4 'b'
48 |
48 |
49 o 2: 814f6bd05178 'c'
49 o 2: 814f6bd05178 'c'
50 |
50 |
51 o 1: 02952614a83d 'd'
51 o 1: 02952614a83d 'd'
52 |
52 |
53 @ 0: b173517d0057 'a'
53 @ 0: b173517d0057 'a'
54
54
55 $ hg cat -r 3 b
55 $ hg cat -r 3 b
56 b (no-eol)
56 b (no-eol)
57 $ hg cat -r 2 c
57 $ hg cat -r 2 c
58 c (no-eol)
58 c (no-eol)
59 $ cd ..
59 $ cd ..
60
60
61 Case 2:
61 Case 2:
62 $ hg init repo2
62 $ hg init repo2
63 $ cd repo2
63 $ cd repo2
64 $ hg debugdrawdag <<'EOS'
64 $ hg debugdrawdag <<'EOS'
65 > c b
65 > c b
66 > |/
66 > |/
67 > d
67 > d
68 > |
68 > |
69 > a
69 > a
70 > EOS
70 > EOS
71
71
72 Add a symlink and executable file:
72 Add a symlink and executable file:
73 $ hg up -C c
73 $ hg up -C c
74 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
74 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
75 $ ln -s somefile e
75 $ ln -s somefile e
76 $ echo f > f
76 $ echo f > f
77 $ chmod +x f
77 $ chmod +x f
78 $ hg add e f
78 $ hg add e f
79 $ hg amend -q
79 $ hg amend -q
80 $ hg up -Cq a
80 $ hg up -Cq a
81
81
82 Write files to the working copy, and ensure they're still there after the rebase
82 Write files to the working copy, and ensure they're still there after the rebase
83 $ echo "abc" > a
83 $ echo "abc" > a
84 $ ln -s def b
84 $ ln -s def b
85 $ echo "ghi" > c
85 $ echo "ghi" > c
86 $ echo "jkl" > d
86 $ echo "jkl" > d
87 $ echo "mno" > e
87 $ echo "mno" > e
88 $ hg tglog
88 $ hg tglog
89 o 3: f56b71190a8f 'c'
89 o 3: f56b71190a8f 'c'
90 |
90 |
91 | o 2: db0e82a16a62 'b'
91 | o 2: db0e82a16a62 'b'
92 |/
92 |/
93 o 1: 02952614a83d 'd'
93 o 1: 02952614a83d 'd'
94 |
94 |
95 @ 0: b173517d0057 'a'
95 @ 0: b173517d0057 'a'
96
96
97 $ hg cat -r 3 c
97 $ hg cat -r 3 c
98 c (no-eol)
98 c (no-eol)
99 $ hg cat -r 2 b
99 $ hg cat -r 2 b
100 b (no-eol)
100 b (no-eol)
101 $ hg cat -r 3 e
101 $ hg cat -r 3 e
102 somefile (no-eol)
102 somefile (no-eol)
103 $ hg rebase --debug -s b -d a | grep rebasing
103 $ hg rebase --debug -s b -d a | grep rebasing
104 rebasing in-memory
104 rebasing in-memory
105 rebasing 2:db0e82a16a62 "b" (b)
105 rebasing 2:db0e82a16a62 "b" (b)
106 $ hg tglog
106 $ hg tglog
107 o 3: fc055c3b4d33 'b'
107 o 3: fc055c3b4d33 'b'
108 |
108 |
109 | o 2: f56b71190a8f 'c'
109 | o 2: f56b71190a8f 'c'
110 | |
110 | |
111 | o 1: 02952614a83d 'd'
111 | o 1: 02952614a83d 'd'
112 |/
112 |/
113 @ 0: b173517d0057 'a'
113 @ 0: b173517d0057 'a'
114
114
115 $ hg cat -r 2 c
115 $ hg cat -r 2 c
116 c (no-eol)
116 c (no-eol)
117 $ hg cat -r 3 b
117 $ hg cat -r 3 b
118 b (no-eol)
118 b (no-eol)
119 $ hg rebase --debug -s 1 -d 3 | grep rebasing
119 $ hg rebase --debug -s 1 -d 3 | grep rebasing
120 rebasing in-memory
120 rebasing in-memory
121 rebasing 1:02952614a83d "d" (d)
121 rebasing 1:02952614a83d "d" (d)
122 rebasing 2:f56b71190a8f "c"
122 rebasing 2:f56b71190a8f "c"
123 $ hg tglog
123 $ hg tglog
124 o 3: 753feb6fd12a 'c'
124 o 3: 753feb6fd12a 'c'
125 |
125 |
126 o 2: 09c044d2cb43 'd'
126 o 2: 09c044d2cb43 'd'
127 |
127 |
128 o 1: fc055c3b4d33 'b'
128 o 1: fc055c3b4d33 'b'
129 |
129 |
130 @ 0: b173517d0057 'a'
130 @ 0: b173517d0057 'a'
131
131
132 Ensure working copy files are still there:
132 Ensure working copy files are still there:
133 $ cat a
133 $ cat a
134 abc
134 abc
135 $ readlink.py b
135 $ readlink.py b
136 b -> def
136 b -> def
137 $ cat e
137 $ cat e
138 mno
138 mno
139
139
140 Ensure symlink and executable files were rebased properly:
140 Ensure symlink and executable files were rebased properly:
141 $ hg up -Cq 3
141 $ hg up -Cq 3
142 $ readlink.py e
142 $ readlink.py e
143 e -> somefile
143 e -> somefile
144 $ ls -l f | cut -c -10
144 $ ls -l f | cut -c -10
145 -rwxr-xr-x
145 -rwxr-xr-x
146
146
147 Rebase the working copy parent
147 Rebase the working copy parent
148 $ hg up -C 3
148 $ hg up -C 3
149 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
149 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
150 $ hg rebase -r 3 -d 0 --debug | grep rebasing
150 $ hg rebase -r 3 -d 0 --debug | grep rebasing
151 rebasing in-memory
151 rebasing in-memory
152 rebasing 3:753feb6fd12a "c" (tip)
152 rebasing 3:753feb6fd12a "c" (tip)
153 $ hg tglog
153 $ hg tglog
154 @ 3: 844a7de3e617 'c'
154 @ 3: 844a7de3e617 'c'
155 |
155 |
156 | o 2: 09c044d2cb43 'd'
156 | o 2: 09c044d2cb43 'd'
157 | |
157 | |
158 | o 1: fc055c3b4d33 'b'
158 | o 1: fc055c3b4d33 'b'
159 |/
159 |/
160 o 0: b173517d0057 'a'
160 o 0: b173517d0057 'a'
161
161
162
162
163 Test reporting of path conflicts
163 Test reporting of path conflicts
164
164
165 $ hg rm a
165 $ hg rm a
166 $ mkdir a
166 $ mkdir a
167 $ touch a/a
167 $ touch a/a
168 $ hg ci -Am "a/a"
168 $ hg ci -Am "a/a"
169 adding a/a
169 adding a/a
170 $ hg tglog
170 $ hg tglog
171 @ 4: daf7dfc139cb 'a/a'
171 @ 4: daf7dfc139cb 'a/a'
172 |
172 |
173 o 3: 844a7de3e617 'c'
173 o 3: 844a7de3e617 'c'
174 |
174 |
175 | o 2: 09c044d2cb43 'd'
175 | o 2: 09c044d2cb43 'd'
176 | |
176 | |
177 | o 1: fc055c3b4d33 'b'
177 | o 1: fc055c3b4d33 'b'
178 |/
178 |/
179 o 0: b173517d0057 'a'
179 o 0: b173517d0057 'a'
180
180
181 $ hg rebase -r . -d 2
181 $ hg rebase -r . -d 2
182 rebasing 4:daf7dfc139cb "a/a" (tip)
182 rebasing 4:daf7dfc139cb "a/a" (tip)
183 saved backup bundle to $TESTTMP/repo2/.hg/strip-backup/daf7dfc139cb-fdbfcf4f-rebase.hg
183 saved backup bundle to $TESTTMP/repo2/.hg/strip-backup/daf7dfc139cb-fdbfcf4f-rebase.hg
184
184
185 $ hg tglog
185 $ hg tglog
186 @ 4: c6ad37a4f250 'a/a'
186 @ 4: c6ad37a4f250 'a/a'
187 |
187 |
188 | o 3: 844a7de3e617 'c'
188 | o 3: 844a7de3e617 'c'
189 | |
189 | |
190 o | 2: 09c044d2cb43 'd'
190 o | 2: 09c044d2cb43 'd'
191 | |
191 | |
192 o | 1: fc055c3b4d33 'b'
192 o | 1: fc055c3b4d33 'b'
193 |/
193 |/
194 o 0: b173517d0057 'a'
194 o 0: b173517d0057 'a'
195
195
196 $ echo foo > foo
196 $ echo foo > foo
197 $ hg ci -Aqm "added foo"
197 $ hg ci -Aqm "added foo"
198 $ hg up '.^'
198 $ hg up '.^'
199 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
199 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
200 $ echo bar > bar
200 $ echo bar > bar
201 $ hg ci -Aqm "added bar"
201 $ hg ci -Aqm "added bar"
202 $ hg rm a/a
202 $ hg rm a/a
203 $ echo a > a
203 $ echo a > a
204 $ hg ci -Aqm "added a back!"
204 $ hg ci -Aqm "added a back!"
205 $ hg tglog
205 $ hg tglog
206 @ 7: 855e9797387e 'added a back!'
206 @ 7: 855e9797387e 'added a back!'
207 |
207 |
208 o 6: d14530e5e3e6 'added bar'
208 o 6: d14530e5e3e6 'added bar'
209 |
209 |
210 | o 5: 9b94b9373deb 'added foo'
210 | o 5: 9b94b9373deb 'added foo'
211 |/
211 |/
212 o 4: c6ad37a4f250 'a/a'
212 o 4: c6ad37a4f250 'a/a'
213 |
213 |
214 | o 3: 844a7de3e617 'c'
214 | o 3: 844a7de3e617 'c'
215 | |
215 | |
216 o | 2: 09c044d2cb43 'd'
216 o | 2: 09c044d2cb43 'd'
217 | |
217 | |
218 o | 1: fc055c3b4d33 'b'
218 o | 1: fc055c3b4d33 'b'
219 |/
219 |/
220 o 0: b173517d0057 'a'
220 o 0: b173517d0057 'a'
221
221
222 $ hg rebase -r . -d 5
222 $ hg rebase -r . -d 5
223 rebasing 7:855e9797387e "added a back!" (tip)
223 rebasing 7:855e9797387e "added a back!" (tip)
224 saved backup bundle to $TESTTMP/repo2/.hg/strip-backup/855e9797387e-81ee4c5d-rebase.hg
224 saved backup bundle to $TESTTMP/repo2/.hg/strip-backup/855e9797387e-81ee4c5d-rebase.hg
225
225
226 $ hg tglog
226 $ hg tglog
227 @ 7: bb3f02be2688 'added a back!'
227 @ 7: bb3f02be2688 'added a back!'
228 |
228 |
229 | o 6: d14530e5e3e6 'added bar'
229 | o 6: d14530e5e3e6 'added bar'
230 | |
230 | |
231 o | 5: 9b94b9373deb 'added foo'
231 o | 5: 9b94b9373deb 'added foo'
232 |/
232 |/
233 o 4: c6ad37a4f250 'a/a'
233 o 4: c6ad37a4f250 'a/a'
234 |
234 |
235 | o 3: 844a7de3e617 'c'
235 | o 3: 844a7de3e617 'c'
236 | |
236 | |
237 o | 2: 09c044d2cb43 'd'
237 o | 2: 09c044d2cb43 'd'
238 | |
238 | |
239 o | 1: fc055c3b4d33 'b'
239 o | 1: fc055c3b4d33 'b'
240 |/
240 |/
241 o 0: b173517d0057 'a'
241 o 0: b173517d0057 'a'
242
242
243 $ mkdir -p c/subdir
243 $ mkdir -p c/subdir
244 $ echo c > c/subdir/file.txt
244 $ echo c > c/subdir/file.txt
245 $ hg add c/subdir/file.txt
245 $ hg add c/subdir/file.txt
246 $ hg ci -m 'c/subdir/file.txt'
246 $ hg ci -m 'c/subdir/file.txt'
247 $ hg rebase -r . -d 3 -n
247 $ hg rebase -r . -d 3 -n
248 starting dry-run rebase; repository will not be changed
248 starting dry-run rebase; repository will not be changed
249 rebasing 8:e147e6e3c490 "c/subdir/file.txt" (tip)
249 rebasing 8:e147e6e3c490 "c/subdir/file.txt" (tip)
250 abort: error: 'c/subdir/file.txt' conflicts with file 'c' in 3.
250 abort: error: 'c/subdir/file.txt' conflicts with file 'c' in 3.
251 [255]
251 [255]
252 $ hg rebase -r 3 -d . -n
252 $ hg rebase -r 3 -d . -n
253 starting dry-run rebase; repository will not be changed
253 starting dry-run rebase; repository will not be changed
254 rebasing 3:844a7de3e617 "c"
254 rebasing 3:844a7de3e617 "c"
255 abort: error: file 'c' cannot be written because 'c/' is a directory in e147e6e3c490 (containing 1 entries: c/subdir/file.txt)
255 abort: error: file 'c' cannot be written because 'c/' is a directory in e147e6e3c490 (containing 1 entries: c/subdir/file.txt)
256 [255]
256 [255]
257
257
258 $ cd ..
258 $ cd ..
259
259
260 Test path auditing (issue5818)
260 Test path auditing (issue5818)
261
261
262 $ mkdir lib_
262 $ mkdir lib_
263 $ ln -s lib_ lib
263 $ ln -s lib_ lib
264 $ hg init repo
264 $ hg init repo
265 $ cd repo
265 $ cd repo
266 $ mkdir -p ".$TESTTMP/lib"
266 $ mkdir -p ".$TESTTMP/lib"
267 $ touch ".$TESTTMP/lib/a"
267 $ touch ".$TESTTMP/lib/a"
268 $ hg add ".$TESTTMP/lib/a"
268 $ hg add ".$TESTTMP/lib/a"
269 $ hg ci -m 'a'
269 $ hg ci -m 'a'
270
270
271 $ touch ".$TESTTMP/lib/b"
271 $ touch ".$TESTTMP/lib/b"
272 $ hg add ".$TESTTMP/lib/b"
272 $ hg add ".$TESTTMP/lib/b"
273 $ hg ci -m 'b'
273 $ hg ci -m 'b'
274
274
275 $ hg up -q '.^'
275 $ hg up -q '.^'
276 $ touch ".$TESTTMP/lib/c"
276 $ touch ".$TESTTMP/lib/c"
277 $ hg add ".$TESTTMP/lib/c"
277 $ hg add ".$TESTTMP/lib/c"
278 $ hg ci -m 'c'
278 $ hg ci -m 'c'
279 created new head
279 created new head
280 $ hg rebase -s 1 -d .
280 $ hg rebase -s 1 -d .
281 rebasing 1:* "b" (glob)
281 rebasing 1:* "b" (glob)
282 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-rebase.hg (glob)
282 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-rebase.hg (glob)
283 $ cd ..
283 $ cd ..
284
284
285 Test dry-run rebasing
285 Test dry-run rebasing
286
286
287 $ hg init repo3
287 $ hg init repo3
288 $ cd repo3
288 $ cd repo3
289 $ echo a>a
289 $ echo a>a
290 $ hg ci -Aqma
290 $ hg ci -Aqma
291 $ echo b>b
291 $ echo b>b
292 $ hg ci -Aqmb
292 $ hg ci -Aqmb
293 $ echo c>c
293 $ echo c>c
294 $ hg ci -Aqmc
294 $ hg ci -Aqmc
295 $ echo d>d
295 $ echo d>d
296 $ hg ci -Aqmd
296 $ hg ci -Aqmd
297 $ echo e>e
297 $ echo e>e
298 $ hg ci -Aqme
298 $ hg ci -Aqme
299
299
300 $ hg up 1 -q
300 $ hg up 1 -q
301 $ echo f>f
301 $ echo f>f
302 $ hg ci -Amf
302 $ hg ci -Amf
303 adding f
303 adding f
304 created new head
304 created new head
305 $ echo g>g
305 $ echo g>g
306 $ hg ci -Aqmg
306 $ hg ci -Aqmg
307 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
307 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
308 @ 6:baf10c5166d4 test
308 @ 6:baf10c5166d4 test
309 | g
309 | g
310 |
310 |
311 o 5:6343ca3eff20 test
311 o 5:6343ca3eff20 test
312 | f
312 | f
313 |
313 |
314 | o 4:e860deea161a test
314 | o 4:e860deea161a test
315 | | e
315 | | e
316 | |
316 | |
317 | o 3:055a42cdd887 test
317 | o 3:055a42cdd887 test
318 | | d
318 | | d
319 | |
319 | |
320 | o 2:177f92b77385 test
320 | o 2:177f92b77385 test
321 |/ c
321 |/ c
322 |
322 |
323 o 1:d2ae7f538514 test
323 o 1:d2ae7f538514 test
324 | b
324 | b
325 |
325 |
326 o 0:cb9a9f314b8b test
326 o 0:cb9a9f314b8b test
327 a
327 a
328
328
329 Make sure it throws error while passing --continue or --abort with --dry-run
329 Make sure it throws error while passing --continue or --abort with --dry-run
330 $ hg rebase -s 2 -d 6 -n --continue
330 $ hg rebase -s 2 -d 6 -n --continue
331 abort: cannot specify both --dry-run and --continue
331 abort: cannot specify both --dry-run and --continue
332 [255]
332 [255]
333 $ hg rebase -s 2 -d 6 -n --abort
333 $ hg rebase -s 2 -d 6 -n --abort
334 abort: cannot specify both --dry-run and --abort
334 abort: cannot specify both --dry-run and --abort
335 [255]
335 [255]
336
336
337 Check dryrun gives correct results when there is no conflict in rebasing
337 Check dryrun gives correct results when there is no conflict in rebasing
338 $ hg rebase -s 2 -d 6 -n
338 $ hg rebase -s 2 -d 6 -n
339 starting dry-run rebase; repository will not be changed
339 starting dry-run rebase; repository will not be changed
340 rebasing 2:177f92b77385 "c"
340 rebasing 2:177f92b77385 "c"
341 rebasing 3:055a42cdd887 "d"
341 rebasing 3:055a42cdd887 "d"
342 rebasing 4:e860deea161a "e"
342 rebasing 4:e860deea161a "e"
343 dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
343 dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
344
344
345 $ hg diff
345 $ hg diff
346 $ hg status
346 $ hg status
347
347
348 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
348 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
349 @ 6:baf10c5166d4 test
349 @ 6:baf10c5166d4 test
350 | g
350 | g
351 |
351 |
352 o 5:6343ca3eff20 test
352 o 5:6343ca3eff20 test
353 | f
353 | f
354 |
354 |
355 | o 4:e860deea161a test
355 | o 4:e860deea161a test
356 | | e
356 | | e
357 | |
357 | |
358 | o 3:055a42cdd887 test
358 | o 3:055a42cdd887 test
359 | | d
359 | | d
360 | |
360 | |
361 | o 2:177f92b77385 test
361 | o 2:177f92b77385 test
362 |/ c
362 |/ c
363 |
363 |
364 o 1:d2ae7f538514 test
364 o 1:d2ae7f538514 test
365 | b
365 | b
366 |
366 |
367 o 0:cb9a9f314b8b test
367 o 0:cb9a9f314b8b test
368 a
368 a
369
369
370 Check dryrun working with --collapse when there is no conflict
370 Check dryrun working with --collapse when there is no conflict
371 $ hg rebase -s 2 -d 6 -n --collapse
371 $ hg rebase -s 2 -d 6 -n --collapse
372 starting dry-run rebase; repository will not be changed
372 starting dry-run rebase; repository will not be changed
373 rebasing 2:177f92b77385 "c"
373 rebasing 2:177f92b77385 "c"
374 rebasing 3:055a42cdd887 "d"
374 rebasing 3:055a42cdd887 "d"
375 rebasing 4:e860deea161a "e"
375 rebasing 4:e860deea161a "e"
376 dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
376 dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
377
377
378 Check dryrun gives correct results when there is conflict in rebasing
378 Check dryrun gives correct results when there is conflict in rebasing
379 Make a conflict:
379 Make a conflict:
380 $ hg up 6 -q
380 $ hg up 6 -q
381 $ echo conflict>e
381 $ echo conflict>e
382 $ hg ci -Aqm "conflict with e"
382 $ hg ci -Aqm "conflict with e"
383 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
383 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
384 @ 7:d2c195b28050 test
384 @ 7:d2c195b28050 test
385 | conflict with e
385 | conflict with e
386 |
386 |
387 o 6:baf10c5166d4 test
387 o 6:baf10c5166d4 test
388 | g
388 | g
389 |
389 |
390 o 5:6343ca3eff20 test
390 o 5:6343ca3eff20 test
391 | f
391 | f
392 |
392 |
393 | o 4:e860deea161a test
393 | o 4:e860deea161a test
394 | | e
394 | | e
395 | |
395 | |
396 | o 3:055a42cdd887 test
396 | o 3:055a42cdd887 test
397 | | d
397 | | d
398 | |
398 | |
399 | o 2:177f92b77385 test
399 | o 2:177f92b77385 test
400 |/ c
400 |/ c
401 |
401 |
402 o 1:d2ae7f538514 test
402 o 1:d2ae7f538514 test
403 | b
403 | b
404 |
404 |
405 o 0:cb9a9f314b8b test
405 o 0:cb9a9f314b8b test
406 a
406 a
407
407
408 $ hg rebase -s 2 -d 7 -n
408 $ hg rebase -s 2 -d 7 -n
409 starting dry-run rebase; repository will not be changed
409 starting dry-run rebase; repository will not be changed
410 rebasing 2:177f92b77385 "c"
410 rebasing 2:177f92b77385 "c"
411 rebasing 3:055a42cdd887 "d"
411 rebasing 3:055a42cdd887 "d"
412 rebasing 4:e860deea161a "e"
412 rebasing 4:e860deea161a "e"
413 merging e
413 merging e
414 transaction abort!
414 transaction abort!
415 rollback completed
415 rollback completed
416 hit a merge conflict
416 hit a merge conflict
417 [1]
417 [1]
418 $ hg diff
418 $ hg diff
419 $ hg status
419 $ hg status
420 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
420 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
421 @ 7:d2c195b28050 test
421 @ 7:d2c195b28050 test
422 | conflict with e
422 | conflict with e
423 |
423 |
424 o 6:baf10c5166d4 test
424 o 6:baf10c5166d4 test
425 | g
425 | g
426 |
426 |
427 o 5:6343ca3eff20 test
427 o 5:6343ca3eff20 test
428 | f
428 | f
429 |
429 |
430 | o 4:e860deea161a test
430 | o 4:e860deea161a test
431 | | e
431 | | e
432 | |
432 | |
433 | o 3:055a42cdd887 test
433 | o 3:055a42cdd887 test
434 | | d
434 | | d
435 | |
435 | |
436 | o 2:177f92b77385 test
436 | o 2:177f92b77385 test
437 |/ c
437 |/ c
438 |
438 |
439 o 1:d2ae7f538514 test
439 o 1:d2ae7f538514 test
440 | b
440 | b
441 |
441 |
442 o 0:cb9a9f314b8b test
442 o 0:cb9a9f314b8b test
443 a
443 a
444
444
445 Check dryrun working with --collapse when there is conflicts
445 Check dryrun working with --collapse when there is conflicts
446 $ hg rebase -s 2 -d 7 -n --collapse
446 $ hg rebase -s 2 -d 7 -n --collapse
447 starting dry-run rebase; repository will not be changed
447 starting dry-run rebase; repository will not be changed
448 rebasing 2:177f92b77385 "c"
448 rebasing 2:177f92b77385 "c"
449 rebasing 3:055a42cdd887 "d"
449 rebasing 3:055a42cdd887 "d"
450 rebasing 4:e860deea161a "e"
450 rebasing 4:e860deea161a "e"
451 merging e
451 merging e
452 hit a merge conflict
452 hit a merge conflict
453 [1]
453 [1]
454
454
455 In-memory rebase that fails due to merge conflicts
455 In-memory rebase that fails due to merge conflicts
456
456
457 $ hg rebase -s 2 -d 7
457 $ hg rebase -s 2 -d 7
458 rebasing 2:177f92b77385 "c"
458 rebasing 2:177f92b77385 "c"
459 rebasing 3:055a42cdd887 "d"
459 rebasing 3:055a42cdd887 "d"
460 rebasing 4:e860deea161a "e"
460 rebasing 4:e860deea161a "e"
461 merging e
461 merging e
462 transaction abort!
462 transaction abort!
463 rollback completed
463 rollback completed
464 hit merge conflicts; re-running rebase without in-memory merge
464 hit merge conflicts; re-running rebase without in-memory merge
465 rebasing 2:177f92b77385 "c"
465 rebasing 2:177f92b77385 "c"
466 rebasing 3:055a42cdd887 "d"
466 rebasing 3:055a42cdd887 "d"
467 rebasing 4:e860deea161a "e"
467 rebasing 4:e860deea161a "e"
468 merging e
468 merging e
469 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
469 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
470 unresolved conflicts (see hg resolve, then hg rebase --continue)
470 unresolved conflicts (see hg resolve, then hg rebase --continue)
471 [1]
471 [1]
472 $ hg rebase --abort
472 $ hg rebase --abort
473 saved backup bundle to $TESTTMP/repo3/.hg/strip-backup/c1e524d4287c-f91f82e1-backup.hg
473 saved backup bundle to $TESTTMP/repo3/.hg/strip-backup/c1e524d4287c-f91f82e1-backup.hg
474 rebase aborted
474 rebase aborted
475
475
476 Retrying without in-memory merge won't lose working copy changes
476 Retrying without in-memory merge won't lose working copy changes
477 $ cd ..
477 $ cd ..
478 $ hg clone repo3 repo3-dirty -q
478 $ hg clone repo3 repo3-dirty -q
479 $ cd repo3-dirty
479 $ cd repo3-dirty
480 $ echo dirty > a
480 $ echo dirty > a
481 $ hg rebase -s 2 -d 7
481 $ hg rebase -s 2 -d 7
482 rebasing 2:177f92b77385 "c"
482 rebasing 2:177f92b77385 "c"
483 rebasing 3:055a42cdd887 "d"
483 rebasing 3:055a42cdd887 "d"
484 rebasing 4:e860deea161a "e"
484 rebasing 4:e860deea161a "e"
485 merging e
485 merging e
486 transaction abort!
486 transaction abort!
487 rollback completed
487 rollback completed
488 hit merge conflicts; re-running rebase without in-memory merge
488 hit merge conflicts; re-running rebase without in-memory merge
489 abort: uncommitted changes
489 abort: uncommitted changes
490 [255]
490 [255]
491 $ cat a
491 $ cat a
492 dirty
492 dirty
493
493
494 Retrying without in-memory merge won't lose merge state
494 Retrying without in-memory merge won't lose merge state
495 $ cd ..
495 $ cd ..
496 $ hg clone repo3 repo3-merge-state -q
496 $ hg clone repo3 repo3-merge-state -q
497 $ cd repo3-merge-state
497 $ cd repo3-merge-state
498 $ hg merge 4
498 $ hg merge 4
499 merging e
499 merging e
500 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
500 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
501 2 files updated, 0 files merged, 0 files removed, 1 files unresolved
501 2 files updated, 0 files merged, 0 files removed, 1 files unresolved
502 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
502 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
503 [1]
503 [1]
504 $ hg resolve -l
504 $ hg resolve -l
505 U e
505 U e
506 $ hg rebase -s 2 -d 7
506 $ hg rebase -s 2 -d 7
507 rebasing 2:177f92b77385 "c"
507 rebasing 2:177f92b77385 "c"
508 abort: outstanding merge conflicts
508 abort: outstanding merge conflicts
509 [255]
509 [255]
510 $ hg resolve -l
510 $ hg resolve -l
511 U e
511 U e
512
512
513 ==========================
513 ==========================
514 Test for --confirm option|
514 Test for --confirm option|
515 ==========================
515 ==========================
516 $ cd ..
516 $ cd ..
517 $ hg clone repo3 repo4 -q
517 $ hg clone repo3 repo4 -q
518 $ cd repo4
518 $ cd repo4
519 $ hg strip 7 -q
519 $ hg strip 7 -q
520 $ 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"
521 @ 6:baf10c5166d4 test
521 @ 6:baf10c5166d4 test
522 | g
522 | g
523 |
523 |
524 o 5:6343ca3eff20 test
524 o 5:6343ca3eff20 test
525 | f
525 | f
526 |
526 |
527 | o 4:e860deea161a test
527 | o 4:e860deea161a test
528 | | e
528 | | e
529 | |
529 | |
530 | o 3:055a42cdd887 test
530 | o 3:055a42cdd887 test
531 | | d
531 | | d
532 | |
532 | |
533 | o 2:177f92b77385 test
533 | o 2:177f92b77385 test
534 |/ c
534 |/ c
535 |
535 |
536 o 1:d2ae7f538514 test
536 o 1:d2ae7f538514 test
537 | b
537 | b
538 |
538 |
539 o 0:cb9a9f314b8b test
539 o 0:cb9a9f314b8b test
540 a
540 a
541
541
542 Check it gives error when both --dryrun and --confirm is used:
542 Check it gives error when both --dryrun and --confirm is used:
543 $ hg rebase -s 2 -d . --confirm --dry-run
543 $ hg rebase -s 2 -d . --confirm --dry-run
544 abort: cannot specify both --confirm and --dry-run
544 abort: cannot specify both --confirm and --dry-run
545 [255]
545 [255]
546 $ hg rebase -s 2 -d . --confirm --abort
546 $ hg rebase -s 2 -d . --confirm --abort
547 abort: cannot specify both --confirm and --abort
547 abort: cannot specify both --confirm and --abort
548 [255]
548 [255]
549 $ hg rebase -s 2 -d . --confirm --continue
549 $ hg rebase -s 2 -d . --confirm --continue
550 abort: cannot specify both --confirm and --continue
550 abort: cannot specify both --confirm and --continue
551 [255]
551 [255]
552
552
553 Test --confirm option when there are no conflicts:
553 Test --confirm option when there are no conflicts:
554 $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF
554 $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF
555 > n
555 > n
556 > EOF
556 > EOF
557 starting in-memory rebase
557 starting in-memory rebase
558 rebasing 2:177f92b77385 "c"
558 rebasing 2:177f92b77385 "c"
559 rebasing 3:055a42cdd887 "d"
559 rebasing 3:055a42cdd887 "d"
560 rebasing 4:e860deea161a "e"
560 rebasing 4:e860deea161a "e"
561 rebase completed successfully
561 rebase completed successfully
562 apply changes (yn)? n
562 apply changes (yn)? n
563 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
563 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
564 @ 6:baf10c5166d4 test
564 @ 6:baf10c5166d4 test
565 | g
565 | g
566 |
566 |
567 o 5:6343ca3eff20 test
567 o 5:6343ca3eff20 test
568 | f
568 | f
569 |
569 |
570 | o 4:e860deea161a test
570 | o 4:e860deea161a test
571 | | e
571 | | e
572 | |
572 | |
573 | o 3:055a42cdd887 test
573 | o 3:055a42cdd887 test
574 | | d
574 | | d
575 | |
575 | |
576 | o 2:177f92b77385 test
576 | o 2:177f92b77385 test
577 |/ c
577 |/ c
578 |
578 |
579 o 1:d2ae7f538514 test
579 o 1:d2ae7f538514 test
580 | b
580 | b
581 |
581 |
582 o 0:cb9a9f314b8b test
582 o 0:cb9a9f314b8b test
583 a
583 a
584
584
585 $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF
585 $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF
586 > y
586 > y
587 > EOF
587 > EOF
588 starting in-memory rebase
588 starting in-memory rebase
589 rebasing 2:177f92b77385 "c"
589 rebasing 2:177f92b77385 "c"
590 rebasing 3:055a42cdd887 "d"
590 rebasing 3:055a42cdd887 "d"
591 rebasing 4:e860deea161a "e"
591 rebasing 4:e860deea161a "e"
592 rebase completed successfully
592 rebase completed successfully
593 apply changes (yn)? y
593 apply changes (yn)? y
594 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
594 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
595 o 9:9fd28f55f6dc test
595 o 9:9fd28f55f6dc test
596 | e
596 | e
597 |
597 |
598 o 8:12cbf031f469 test
598 o 8:12cbf031f469 test
599 | d
599 | d
600 |
600 |
601 o 7:c83b1da5b1ae test
601 o 7:c83b1da5b1ae test
602 | c
602 | c
603 |
603 |
604 @ 6:baf10c5166d4 test
604 @ 6:baf10c5166d4 test
605 | g
605 | g
606 |
606 |
607 o 5:6343ca3eff20 test
607 o 5:6343ca3eff20 test
608 | f
608 | f
609 |
609 |
610 | o 4:e860deea161a test
610 | o 4:e860deea161a test
611 | | e
611 | | e
612 | |
612 | |
613 | o 3:055a42cdd887 test
613 | o 3:055a42cdd887 test
614 | | d
614 | | d
615 | |
615 | |
616 | o 2:177f92b77385 test
616 | o 2:177f92b77385 test
617 |/ c
617 |/ c
618 |
618 |
619 o 1:d2ae7f538514 test
619 o 1:d2ae7f538514 test
620 | b
620 | b
621 |
621 |
622 o 0:cb9a9f314b8b test
622 o 0:cb9a9f314b8b test
623 a
623 a
624
624
625 Test --confirm option when there is a conflict
625 Test --confirm option when there is a conflict
626 $ hg up tip -q
626 $ hg up tip -q
627 $ echo ee>e
627 $ echo ee>e
628 $ hg ci --amend -m "conflict with e" -q
628 $ hg ci --amend -m "conflict with e" -q
629 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
629 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
630 @ 9:906d72f66a59 test
630 @ 9:906d72f66a59 test
631 | conflict with e
631 | conflict with e
632 |
632 |
633 o 8:12cbf031f469 test
633 o 8:12cbf031f469 test
634 | d
634 | d
635 |
635 |
636 o 7:c83b1da5b1ae test
636 o 7:c83b1da5b1ae test
637 | c
637 | c
638 |
638 |
639 o 6:baf10c5166d4 test
639 o 6:baf10c5166d4 test
640 | g
640 | g
641 |
641 |
642 o 5:6343ca3eff20 test
642 o 5:6343ca3eff20 test
643 | f
643 | f
644 |
644 |
645 | o 4:e860deea161a test
645 | o 4:e860deea161a test
646 | | e
646 | | e
647 | |
647 | |
648 | o 3:055a42cdd887 test
648 | o 3:055a42cdd887 test
649 | | d
649 | | d
650 | |
650 | |
651 | o 2:177f92b77385 test
651 | o 2:177f92b77385 test
652 |/ c
652 |/ c
653 |
653 |
654 o 1:d2ae7f538514 test
654 o 1:d2ae7f538514 test
655 | b
655 | b
656 |
656 |
657 o 0:cb9a9f314b8b test
657 o 0:cb9a9f314b8b test
658 a
658 a
659
659
660 $ hg rebase -s 4 -d . --keep --confirm
660 $ hg rebase -s 4 -d . --keep --confirm
661 starting in-memory rebase
661 starting in-memory rebase
662 rebasing 4:e860deea161a "e"
662 rebasing 4:e860deea161a "e"
663 merging e
663 merging e
664 hit a merge conflict
664 hit a merge conflict
665 [1]
665 [1]
666 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
666 $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
667 @ 9:906d72f66a59 test
667 @ 9:906d72f66a59 test
668 | conflict with e
668 | conflict with e
669 |
669 |
670 o 8:12cbf031f469 test
670 o 8:12cbf031f469 test
671 | d
671 | d
672 |
672 |
673 o 7:c83b1da5b1ae test
673 o 7:c83b1da5b1ae test
674 | c
674 | c
675 |
675 |
676 o 6:baf10c5166d4 test
676 o 6:baf10c5166d4 test
677 | g
677 | g
678 |
678 |
679 o 5:6343ca3eff20 test
679 o 5:6343ca3eff20 test
680 | f
680 | f
681 |
681 |
682 | o 4:e860deea161a test
682 | o 4:e860deea161a test
683 | | e
683 | | e
684 | |
684 | |
685 | o 3:055a42cdd887 test
685 | o 3:055a42cdd887 test
686 | | d
686 | | d
687 | |
687 | |
688 | o 2:177f92b77385 test
688 | o 2:177f92b77385 test
689 |/ c
689 |/ c
690 |
690 |
691 o 1:d2ae7f538514 test
691 o 1:d2ae7f538514 test
692 | b
692 | b
693 |
693 |
694 o 0:cb9a9f314b8b test
694 o 0:cb9a9f314b8b test
695 a
695 a
696
696
697 Test a metadata-only in-memory merge
697 Test a metadata-only in-memory merge
698 $ cd $TESTTMP
698 $ cd $TESTTMP
699 $ hg init no_exception
699 $ hg init no_exception
700 $ cd no_exception
700 $ cd no_exception
701 # Produce the following graph:
701 # Produce the following graph:
702 # o 'add +x to foo.txt'
702 # o 'add +x to foo.txt'
703 # | o r1 (adds bar.txt, just for something to rebase to)
703 # | o r1 (adds bar.txt, just for something to rebase to)
704 # |/
704 # |/
705 # o r0 (adds foo.txt, no +x)
705 # o r0 (adds foo.txt, no +x)
706 $ echo hi > foo.txt
706 $ echo hi > foo.txt
707 $ hg ci -qAm r0
707 $ hg ci -qAm r0
708 $ echo hi > bar.txt
708 $ echo hi > bar.txt
709 $ hg ci -qAm r1
709 $ hg ci -qAm r1
710 $ hg co -qr ".^"
710 $ hg co -qr ".^"
711 $ chmod +x foo.txt
711 $ chmod +x foo.txt
712 $ hg ci -qAm 'add +x to foo.txt'
712 $ hg ci -qAm 'add +x to foo.txt'
713 issue5960: this was raising an AttributeError exception
713 issue5960: this was raising an AttributeError exception
714 $ hg rebase -r . -d 1
714 $ hg rebase -r . -d 1
715 rebasing 2:539b93e77479 "add +x to foo.txt" (tip)
715 rebasing 2:539b93e77479 "add +x to foo.txt" (tip)
716 saved backup bundle to $TESTTMP/no_exception/.hg/strip-backup/*.hg (glob)
716 saved backup bundle to $TESTTMP/no_exception/.hg/strip-backup/*.hg (glob)
717 $ hg diff -c tip
717 $ hg diff -c tip
718 diff --git a/foo.txt b/foo.txt
718 diff --git a/foo.txt b/foo.txt
719 old mode 100644
719 old mode 100644
720 new mode 100755
720 new mode 100755
721
721
722 Test rebasing a commit with copy information, but no content changes
722 Test rebasing a commit with copy information, but no content changes
723
723
724 $ cd ..
724 $ cd ..
725 $ hg clone -q repo1 merge-and-rename
725 $ hg clone -q repo1 merge-and-rename
726 $ cd merge-and-rename
726 $ cd merge-and-rename
727 $ cat << EOF >> .hg/hgrc
727 $ cat << EOF >> .hg/hgrc
728 > [experimental]
728 > [experimental]
729 > evolution.createmarkers=True
729 > evolution.createmarkers=True
730 > evolution.allowunstable=True
730 > evolution.allowunstable=True
731 > EOF
731 > EOF
732 $ hg co -q 1
732 $ hg co -q 1
733 $ hg mv d e
733 $ hg mv d e
734 $ hg ci -qm 'rename d to e'
734 $ hg ci -qm 'rename d to e'
735 $ hg co -q 3
735 $ hg co -q 3
736 $ hg merge -q 4
736 $ hg merge -q 4
737 $ hg ci -m 'merge'
737 $ hg ci -m 'merge'
738 $ hg co -q 2
738 $ hg co -q 2
739 $ mv d e
739 $ mv d e
740 $ hg addremove -qs 0
740 $ hg addremove -qs 0
741 $ hg ci -qm 'untracked rename of d to e'
741 $ hg ci -qm 'untracked rename of d to e'
742 $ hg debugobsolete -q `hg log -T '{node}' -r 4` `hg log -T '{node}' -r .`
742 $ hg debugobsolete -q `hg log -T '{node}' -r 4` `hg log -T '{node}' -r .`
743 1 new orphan changesets
743 1 new orphan changesets
744 $ hg tglog
744 $ hg tglog
745 @ 6: 676538af172d 'untracked rename of d to e'
745 @ 6: 676538af172d 'untracked rename of d to e'
746 |
746 |
747 | * 5: 71cb43376053 'merge'
747 | * 5: 71cb43376053 'merge'
748 | |\
748 | |\
749 | | x 4: 2c8b5dad7956 'rename d to e'
749 | | x 4: 2c8b5dad7956 'rename d to e'
750 | | |
750 | | |
751 | o | 3: ca58782ad1e4 'b'
751 | o | 3: ca58782ad1e4 'b'
752 |/ /
752 |/ /
753 o / 2: 814f6bd05178 'c'
753 o / 2: 814f6bd05178 'c'
754 |/
754 |/
755 o 1: 02952614a83d 'd'
755 o 1: 02952614a83d 'd'
756 |
756 |
757 o 0: b173517d0057 'a'
757 o 0: b173517d0057 'a'
758
758
759 $ hg rebase -b 5 -d tip
759 $ hg rebase -b 5 -d tip
760 rebasing 3:ca58782ad1e4 "b"
760 rebasing 3:ca58782ad1e4 "b"
761 rebasing 5:71cb43376053 "merge"
761 rebasing 5:71cb43376053 "merge"
762 note: not rebasing 5:71cb43376053 "merge", its destination already has all its changes
762 note: not rebasing 5:71cb43376053 "merge", its destination already has all its changes
763
763
764 $ cd ..
764 $ cd ..
765
765
766 Test rebasing a commit with copy information
766 Test rebasing a commit with copy information
767
767
768 $ hg init rebase-rename
768 $ hg init rebase-rename
769 $ cd rebase-rename
769 $ cd rebase-rename
770 $ echo a > a
770 $ echo a > a
771 $ hg ci -Aqm 'add a'
771 $ hg ci -Aqm 'add a'
772 $ echo a2 > a
772 $ echo a2 > a
773 $ hg ci -m 'modify a'
773 $ hg ci -m 'modify a'
774 $ hg co -q 0
774 $ hg co -q 0
775 $ hg mv a b
775 $ hg mv a b
776 $ hg ci -qm 'rename a to b'
776 $ hg ci -qm 'rename a to b'
777 $ hg rebase -d 1
777 $ hg rebase -d 1
778 rebasing 2:b977edf6f839 "rename a to b" (tip)
778 rebasing 2:b977edf6f839 "rename a to b" (tip)
779 merging a and b to b
779 merging a and b to b
780 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/b977edf6f839-0864f570-rebase.hg
780 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/b977edf6f839-0864f570-rebase.hg
781 $ hg st --copies --change .
781 $ hg st --copies --change .
782 A b
782 A b
783 a
783 a
784 R a
784 R a
785 $ cd ..
785 $ cd ..
786
786
787 Rebase across a copy with --collapse
788
789 $ hg init rebase-rename-collapse
790 $ cd rebase-rename-collapse
791 $ echo a > a
792 $ hg ci -Aqm 'add a'
793 $ hg mv a b
794 $ hg ci -m 'rename a to b'
795 $ hg co -q 0
796 $ echo a2 > a
797 $ hg ci -qm 'modify a'
798 BROKEN: obviously...
799 $ hg rebase -r . -d 1 --collapse
800 rebasing 2:41c4ea50d4cf "modify a" (tip)
801 merging b and a to b
802 abort: a@b977edf6f839: not found in manifest!
803 [255]
804 $ cd ..
805
787 Test rebasing when the file we are merging in destination is empty
806 Test rebasing when the file we are merging in destination is empty
788
807
789 $ hg init test
808 $ hg init test
790 $ cd test
809 $ cd test
791 $ echo a > foo
810 $ echo a > foo
792 $ hg ci -Aqm 'added a to foo'
811 $ hg ci -Aqm 'added a to foo'
793
812
794 $ rm foo
813 $ rm foo
795 $ touch foo
814 $ touch foo
796 $ hg di
815 $ hg di
797 diff --git a/foo b/foo
816 diff --git a/foo b/foo
798 --- a/foo
817 --- a/foo
799 +++ b/foo
818 +++ b/foo
800 @@ -1,1 +0,0 @@
819 @@ -1,1 +0,0 @@
801 -a
820 -a
802
821
803 $ hg ci -m "make foo an empty file"
822 $ hg ci -m "make foo an empty file"
804
823
805 $ hg up '.^'
824 $ hg up '.^'
806 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
825 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
807 $ echo b > foo
826 $ echo b > foo
808 $ hg di
827 $ hg di
809 diff --git a/foo b/foo
828 diff --git a/foo b/foo
810 --- a/foo
829 --- a/foo
811 +++ b/foo
830 +++ b/foo
812 @@ -1,1 +1,1 @@
831 @@ -1,1 +1,1 @@
813 -a
832 -a
814 +b
833 +b
815 $ hg ci -m "add b to foo"
834 $ hg ci -m "add b to foo"
816 created new head
835 created new head
817
836
818 $ hg rebase -r . -d 1 --config ui.merge=internal:merge3
837 $ hg rebase -r . -d 1 --config ui.merge=internal:merge3
819 rebasing 2:fb62b706688e "add b to foo" (tip)
838 rebasing 2:fb62b706688e "add b to foo" (tip)
820 merging foo
839 merging foo
821 hit merge conflicts; re-running rebase without in-memory merge
840 hit merge conflicts; re-running rebase without in-memory merge
822 rebasing 2:fb62b706688e "add b to foo" (tip)
841 rebasing 2:fb62b706688e "add b to foo" (tip)
823 merging foo
842 merging foo
824 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
843 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
825 unresolved conflicts (see hg resolve, then hg rebase --continue)
844 unresolved conflicts (see hg resolve, then hg rebase --continue)
826 [1]
845 [1]
General Comments 0
You need to be logged in to leave comments. Login now