tests/test-push-checkheads-mixed-branch-topic-G2.t
branchstable
changeset 5270 c6a84c6a26b8
parent 5269 5a46f156c9b7
child 5279 35e769c9604f
equal deleted inserted replaced
5269:5a46f156c9b7 5270:c6a84c6a26b8
       
     1 ====================================
       
     2 Testing head checking code: Case E-2
       
     3 ====================================
       
     4 
       
     5 Mercurial checks for the introduction of new heads on push. Evolution comes
       
     6 into play to detect if existing branches on the server are being replaced by
       
     7 some of the new one we push.
       
     8 
       
     9 This case is part of a series of tests checking this behavior.
       
    10 
       
    11 Category F: case involving changeset on multiple branch
       
    12 TestCase 2: moving interleaved branch away from each other
       
    13 
       
    14 .. old-state:
       
    15 ..
       
    16 .. * 2-changeset on branch default
       
    17 .. * 1-changeset on topic Z (between the two other)
       
    18 ..
       
    19 .. new-state:
       
    20 ..
       
    21 .. * 2-changeset on branch default, aligned
       
    22 .. * 1-changeset on topic Z (at the same location)
       
    23 ..
       
    24 .. expected-result:
       
    25 ..
       
    26 .. * push allowed
       
    27 ..
       
    28 .. graph-summary:
       
    29 ..
       
    30 ..   C ø⇠◔ C' branch default
       
    31 ..     | |
       
    32 ..   B ◔ |    topic Z
       
    33 ..     | |
       
    34 ..   A ø⇠◔ A' branch default
       
    35 ..     |/
       
    36 ..     ●
       
    37 
       
    38   $ . $TESTDIR/testlib/topic_setup.sh
       
    39   $ . $TESTDIR/testlib/push-checkheads-util.sh
       
    40 
       
    41 Test setup
       
    42 ----------
       
    43 
       
    44   $ mkdir E1
       
    45   $ cd E1
       
    46   $ setuprepos
       
    47   creating basic server and client repo
       
    48   updating to branch default
       
    49   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
    50   $ cd client
       
    51   $ hg topic Z
       
    52   marked working directory as topic: Z
       
    53   $ mkcommit B0
       
    54   active topic 'Z' grew its first changeset
       
    55   (see 'hg help topics' for more information)
       
    56   $ hg topic --clear
       
    57   $ mkcommit C0
       
    58   created new head
       
    59   (consider using topic for lightweight branches. See 'hg help topic')
       
    60   $ hg push
       
    61   pushing to $TESTTMP/E1/server
       
    62   searching for changes
       
    63   adding changesets
       
    64   adding manifests
       
    65   adding file changes
       
    66   added 2 changesets with 2 changes to 2 files
       
    67   $ hg up 0
       
    68   0 files updated, 0 files merged, 3 files removed, 0 files unresolved
       
    69   $ mkcommit A1
       
    70   created new head
       
    71   (consider using topic for lightweight branches. See 'hg help topic')
       
    72   $ mkcommit C1
       
    73   $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
       
    74   1 new obsolescence markers
       
    75   obsoleted 1 changesets
       
    76   2 new orphan changesets
       
    77   $ hg debugobsolete `getid "desc(C0)" ` `getid "desc(C1)"`
       
    78   1 new obsolescence markers
       
    79   obsoleted 1 changesets
       
    80   $ hg log -G --hidden
       
    81   @  0c76bc104656 (draft): C1
       
    82   |
       
    83   o  f6082bc4ffef (draft): A1
       
    84   |
       
    85   | x  44759c6d327d (draft): C0
       
    86   | |
       
    87   | *  35d2f30a8ba4 (draft)[Z]: B0
       
    88   | |
       
    89   | x  8aaa48160adc (draft): A0
       
    90   |/
       
    91   o  1e4be0697311 (public): root
       
    92   
       
    93 
       
    94 Actual testing
       
    95 --------------
       
    96 
       
    97   $ hg push -r 'desc("C1")'
       
    98   pushing to $TESTTMP/E1/server
       
    99   searching for changes
       
   100   adding changesets
       
   101   adding manifests
       
   102   adding file changes
       
   103   added 2 changesets with 2 changes to 2 files (+1 heads)
       
   104   2 new obsolescence markers
       
   105   obsoleted 2 changesets
       
   106   1 new orphan changesets
       
   107 
       
   108   $ cd ../..