tests/test-evolve-orphan-switched-ancestors.t
changeset 5314 f12d2172a133
equal deleted inserted replaced
5312:9035901412e6 5314:f12d2172a133
       
     1   $ . $TESTDIR/testlib/common.sh
       
     2   $ cat >> $HGRCPATH <<EOF
       
     3   > [extensions]
       
     4   > evolve=
       
     5   > [alias]
       
     6   > glog = log -GT "{rev}:{node|short} {desc}\n"
       
     7   > EOF
       
     8 
       
     9 Test that, even if the order of the ancestors has been switched, the orphan is
       
    10 rebased such that it has the sucessors of both original ancestors are the new
       
    11 ancestors.
       
    12 
       
    13   $ hg init repo
       
    14   $ cd repo
       
    15   $ mkcommit a
       
    16   $ mkcommit b
       
    17   $ echo a1 > a; echo b1 > b; hg ci -m 'mod ab'
       
    18   $ hg up null -q
       
    19   $ hg pick 1
       
    20   picking 1:d2ae7f538514 "b"
       
    21   1 new orphan changesets
       
    22   $ hg pick 0
       
    23   picking 0:cb9a9f314b8b "a"
       
    24   $ hg next --dry-run
       
    25   move:[2] mod ab
       
    26   atop:[4] a
       
    27   hg rebase -r cc6607605d1e -d f4a8092719b1
       
    28   $ hg evolve
       
    29   move:[2] mod ab
       
    30   atop:[4] a
       
    31   $ hg glog
       
    32   o  5:866738c73814 mod ab
       
    33   |
       
    34   @  4:f4a8092719b1 a
       
    35   |
       
    36   o  3:6563da9dcf87 b
       
    37