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