345 $ hg summary -q |
345 $ hg summary -q |
346 parent: 5:63379946892c |
346 parent: 5:63379946892c |
347 commit: 1 added, 1 unknown (new branch head) |
347 commit: 1 added, 1 unknown (new branch head) |
348 update: 4 new changesets (update) |
348 update: 4 new changesets (update) |
349 |
349 |
|
350 $ cd .. |
|
351 |
|
352 Set up default base revision tests |
|
353 |
|
354 $ hg init defaultbase |
|
355 $ cd defaultbase |
|
356 $ touch foo |
|
357 $ hg -q commit -A -m root |
|
358 $ echo 1 > foo |
|
359 $ hg commit -m 'public 1' |
|
360 $ hg phase --force --public -r . |
|
361 $ echo 2 > foo |
|
362 $ hg commit -m 'draft after public' |
|
363 $ hg -q up -r 1 |
|
364 $ echo 3 > foo |
|
365 $ hg commit -m 'head 1 public' |
|
366 created new head |
|
367 $ hg phase --force --public -r . |
|
368 $ echo 4 > foo |
|
369 $ hg commit -m 'head 1 draft 1' |
|
370 $ echo 5 > foo |
|
371 $ hg commit -m 'head 1 draft 2' |
|
372 $ hg -q up -r 2 |
|
373 $ echo 6 > foo |
|
374 $ hg commit -m 'head 2 commit 1' |
|
375 $ echo 7 > foo |
|
376 $ hg commit -m 'head 2 commit 2' |
|
377 $ hg -q up -r 2 |
|
378 $ echo 8 > foo |
|
379 $ hg commit -m 'head 3' |
|
380 created new head |
|
381 $ hg -q up -r 2 |
|
382 $ echo 9 > foo |
|
383 $ hg commit -m 'head 4' |
|
384 created new head |
|
385 $ hg merge --tool :local -r 8 |
|
386 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
387 (branch merge, don't forget to commit) |
|
388 $ hg commit -m 'merge head 3 into head 4' |
|
389 $ echo 11 > foo |
|
390 $ hg commit -m 'commit 1 after merge' |
|
391 $ echo 12 > foo |
|
392 $ hg commit -m 'commit 2 after merge' |
|
393 |
|
394 $ hg log -G -T '{rev}:{node|short} {phase} {desc}\n' |
|
395 @ 12:8cde254db839 draft commit 2 after merge |
|
396 | |
|
397 o 11:6f2f0241f119 draft commit 1 after merge |
|
398 | |
|
399 o 10:90506cc76b00 draft merge head 3 into head 4 |
|
400 |\ |
|
401 | o 9:f8607a373a97 draft head 4 |
|
402 | | |
|
403 o | 8:0da92be05148 draft head 3 |
|
404 |/ |
|
405 | o 7:4c35cdf97d5e draft head 2 commit 2 |
|
406 | | |
|
407 | o 6:931820154288 draft head 2 commit 1 |
|
408 |/ |
|
409 | o 5:8cdc02b9bc63 draft head 1 draft 2 |
|
410 | | |
|
411 | o 4:463b8c0d2973 draft head 1 draft 1 |
|
412 | | |
|
413 | o 3:23a0c4eefcbf public head 1 public |
|
414 | | |
|
415 o | 2:4117331c3abb draft draft after public |
|
416 |/ |
|
417 o 1:4426d359ea59 public public 1 |
|
418 | |
|
419 o 0:54136a8ddf32 public root |
|
420 |
|
421 |
|
422 Default base revision should stop at public changesets |
|
423 |
|
424 $ hg -q up 8cdc02b9bc63 |
|
425 $ hg histedit --commands - <<EOF |
|
426 > pick 463b8c0d2973 |
|
427 > pick 8cdc02b9bc63 |
|
428 > EOF |
|
429 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
430 |
|
431 Default base revision should stop at branchpoint |
|
432 |
|
433 $ hg -q up 4c35cdf97d5e |
|
434 $ hg histedit --commands - <<EOF |
|
435 > pick 931820154288 |
|
436 > pick 4c35cdf97d5e |
|
437 > EOF |
|
438 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
439 |
|
440 Default base revision should stop at merge commit |
|
441 |
|
442 $ hg -q up 8cde254db839 |
|
443 $ hg histedit --commands - <<EOF |
|
444 > pick 6f2f0241f119 |
|
445 > pick 8cde254db839 |
|
446 > EOF |
|
447 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |