tests/test-checkheads-pruned-B1.t
changeset 2285 080b9384d741
parent 2265 dad84c052463
parent 2284 1b6d4d176145
child 2286 a4c5744a7b93
equal deleted inserted replaced
2265:dad84c052463 2285:080b9384d741
     1 ====================================
       
     2 Testing head checking code: Case B-1
       
     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 1: single pruned changeset
       
    13 
       
    14 .. old-state:
       
    15 ..
       
    16 .. * 1 changeset branch
       
    17 ..
       
    18 .. new-state:
       
    19 ..
       
    20 .. * old branch is pruned
       
    21 .. * 1 new unrelated branch
       
    22 ..
       
    23 .. expected-result:
       
    24 ..
       
    25 .. * push allowed
       
    26 ..
       
    27 .. graph-summary:
       
    28 ..
       
    29 ..       ◔ B
       
    30 ..       |
       
    31 ..   A ⊗ |
       
    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   $ hg debugobsolete --record-parents `getid "desc(A0)"`
       
    50   $ hg log -G --hidden
       
    51   @  74ff5441d343 (draft): B0
       
    52   |
       
    53   | x  8aaa48160adc (draft): A0
       
    54   |/
       
    55   o  1e4be0697311 (public): root
       
    56   
       
    57 
       
    58 Actual testing
       
    59 --------------
       
    60 
       
    61   $ hg push
       
    62   pushing to $TESTTMP/server
       
    63   searching for changes
       
    64   adding changesets
       
    65   adding manifests
       
    66   adding file changes
       
    67   added 1 changesets with 1 changes to 1 files (+1 heads)
       
    68   1 new obsolescence markers
       
    69 
       
    70 
       
    71