tests/test-checkheads-superceed-A5.t
changeset 2119 e1c26c632b6d
equal deleted inserted replaced
2118:d0bc98161794 2119:e1c26c632b6d
       
     1 ====================================
       
     2 Testing head checking code: Case A-5
       
     3 ====================================
       
     4 
       
     5 Mercurial checks for the introduction of multiple heads on push. Evolution
       
     6 comes into play to detect if existing heads on the server are being replaced by
       
     7 some of the new heads we push.
       
     8 
       
     9 This test file is part of a series of tests checking this behavior.
       
    10 
       
    11 Category A: checking simple case invoving a branch being superceeded by another.
       
    12 TestCase 5: New changeset as parent of the successor
       
    13 
       
    14 .. old-state:
       
    15 ..
       
    16 .. * 1 changeset branch
       
    17 ..
       
    18 .. new-state:
       
    19 ..
       
    20 .. * 2 changeset branch, head is a successor, but other is new
       
    21 ..
       
    22 .. expected-result:
       
    23 ..
       
    24 .. * push allowed
       
    25 ..
       
    26 .. graph-summary:
       
    27 ..
       
    28 ..   A ø⇠◔ A'
       
    29 ..     | |
       
    30 ..     | ◔ B
       
    31 ..     |/
       
    32 ..     ○
       
    33 
       
    34   $ . $TESTDIR/testlib/checkheads-util.sh
       
    35 
       
    36 Test setup
       
    37 ----------
       
    38 
       
    39   $ setuprepos
       
    40   creating basic server and client repo
       
    41   updating to branch default
       
    42   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
    43   $ cd client
       
    44   $ hg up 0
       
    45   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
    46   $ mkcommit B0
       
    47   created new head
       
    48   $ mkcommit A1
       
    49   $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
       
    50   $ hg log -G --hidden
       
    51   @  ba93660aff8d (draft): A1
       
    52   |
       
    53   o  74ff5441d343 (draft): B0
       
    54   |
       
    55   | x  8aaa48160adc (draft): A0
       
    56   |/
       
    57   o  1e4be0697311 (public): root
       
    58   
       
    59 
       
    60 
       
    61 Actual testing
       
    62 --------------
       
    63 
       
    64   $ hg push
       
    65   pushing to $TESTTMP/server
       
    66   searching for changes
       
    67   adding changesets
       
    68   adding manifests
       
    69   adding file changes
       
    70   added 2 changesets with 2 changes to 2 files (+1 heads)
       
    71   1 new obsolescence markers
       
    72 
       
    73 
       
    74