tests/test-checkheads-pruned-B4.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-4
       
     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 4: multi-changeset branch, all are pruned
       
    13 
       
    14 .. old-state:
       
    15 ..
       
    16 .. * 2 changeset branch
       
    17 ..
       
    18 .. new-state:
       
    19 ..
       
    20 .. * old branch is pruned
       
    21 ..
       
    22 .. expected-result:
       
    23 ..
       
    24 .. * push allowed
       
    25 ..
       
    26 .. graph-summary:
       
    27 ..
       
    28 ..   B ⊗
       
    29 ..     |
       
    30 ..   A ⊗
       
    31 ..     |
       
    32 ..     | ◔ C
       
    33 ..     |/
       
    34 ..     ○
       
    35 
       
    36   $ . $TESTDIR/testlib/checkheads-util.sh
       
    37 
       
    38 Test setup
       
    39 ----------
       
    40 
       
    41   $ setuprepos
       
    42   creating basic server and client repo
       
    43   updating to branch default
       
    44   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
    45   $ cd server
       
    46   $ mkcommit B0
       
    47   $ cd ../client
       
    48   $ hg pull
       
    49   pulling from $TESTTMP/server
       
    50   searching for changes
       
    51   adding changesets
       
    52   adding manifests
       
    53   adding file changes
       
    54   added 1 changesets with 1 changes to 1 files
       
    55   (run 'hg update' to get a working copy)
       
    56   $ hg up 0
       
    57   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
    58   $ mkcommit C0
       
    59   created new head
       
    60   $ hg debugobsolete --record-parents `getid "desc(A0)"`
       
    61   $ hg debugobsolete --record-parents `getid "desc(B0)"`
       
    62   $ hg log -G --hidden
       
    63   @  0f88766e02d6 (draft): C0
       
    64   |
       
    65   | x  d73caddc5533 (draft): B0
       
    66   | |
       
    67   | x  8aaa48160adc (draft): A0
       
    68   |/
       
    69   o  1e4be0697311 (public): root
       
    70   
       
    71 
       
    72 Actual testing
       
    73 --------------
       
    74 
       
    75   $ hg push
       
    76   pushing to $TESTTMP/server
       
    77   searching for changes
       
    78   adding changesets
       
    79   adding manifests
       
    80   adding file changes
       
    81   added 1 changesets with 1 changes to 1 files (+1 heads)
       
    82   2 new obsolescence markers
       
    83