tests/test-checkheads-pruned-B6.t
branchmercurial-4.0
changeset 2278 2db189baf8b7
parent 2260 e200dbfb4515
parent 2277 61d885899466
child 2279 347849e17876
child 2318 523855eb28c1
equal deleted inserted replaced
2260:e200dbfb4515 2278:2db189baf8b7
     1 ====================================
       
     2 Testing head checking code: Case B-6
       
     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 B: checking simple case involving pruned changesets
       
    12 TestCase 6: single changesets, pruned then superseeded (on a new changeset)
       
    13 
       
    14 .. old-state:
       
    15 ..
       
    16 .. * 1 changeset branch
       
    17 ..
       
    18 .. new-state:
       
    19 ..
       
    20 .. * old branch is rewritten onto another one,
       
    21 .. * the new version is then pruned.
       
    22 ..
       
    23 .. expected-result:
       
    24 ..
       
    25 .. * push allowed
       
    26 ..
       
    27 .. graph-summary:
       
    28 ..
       
    29 ..   A ø⇠⊗ A'
       
    30 ..     | |
       
    31 ..     | ◔ B
       
    32 ..     |/
       
    33 ..     ○
       
    34 
       
    35   $ . $TESTDIR/testlib/checkheads-util.sh
       
    36 
       
    37 Test setup
       
    38 ----------
       
    39 
       
    40   $ setuprepos
       
    41   creating basic server and client repo
       
    42   updating to branch default
       
    43   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
    44   $ cd client
       
    45   $ hg up 0
       
    46   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
    47   $ mkcommit B0
       
    48   created new head
       
    49   $ mkcommit A1
       
    50   $ hg up 'desc(B0)'
       
    51   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
    52   $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"`
       
    53   $ hg debugobsolete --record-parents `getid "desc(A1)"`
       
    54   $ hg log -G --hidden
       
    55   x  ba93660aff8d (draft): A1
       
    56   |
       
    57   @  74ff5441d343 (draft): B0
       
    58   |
       
    59   | x  8aaa48160adc (draft): A0
       
    60   |/
       
    61   o  1e4be0697311 (public): root
       
    62   
       
    63 
       
    64 Actual testing
       
    65 --------------
       
    66 
       
    67   $ hg push
       
    68   pushing to $TESTTMP/server
       
    69   searching for changes
       
    70   adding changesets
       
    71   adding manifests
       
    72   adding file changes
       
    73   added 1 changesets with 1 changes to 1 files (+1 heads)
       
    74   2 new obsolescence markers