tests/test-exchange-obsmarkers-case-B1.t
branchstable
changeset 2268 f2ebe960998b
parent 2230 a202f3af890c
child 2525 5adb8bdb935e
equal deleted inserted replaced
2267:150fee60887a 2268:f2ebe960998b
       
     1 ============================================
       
     2 Testing obsolescence markers push: Cases B.1
       
     3 ============================================
       
     4 
       
     5 Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of
       
     6 all changesets that requested to be "in sync" after the push (even if they are
       
     7 already on both side).
       
     8 
       
     9 This test belongs to a series of tests checking such set is properly computed
       
    10 and applied. This does not tests "obsmarkers" discovery capabilities.
       
    11 
       
    12 Category B: pruning case
       
    13 TestCase 1: Prune on non-targeted common changeset
       
    14 
       
    15 B.1 Prune on non-targeted common changeset
       
    16 ==========================================
       
    17 
       
    18 .. {{{
       
    19 ..     ⊗ B
       
    20 ..     |
       
    21 ..     ◕ A
       
    22 ..     |
       
    23 ..     ● O
       
    24 .. }}}
       
    25 ..
       
    26 .. Marker exist from:
       
    27 ..
       
    28 ..  * B (prune)
       
    29 ..
       
    30 .. Command runs:
       
    31 ..
       
    32 ..  * hg push -r O
       
    33 ..
       
    34 .. Expected exclude:
       
    35 ..
       
    36 ..  * B (prune)
       
    37 
       
    38 Setup
       
    39 -----
       
    40 
       
    41   $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
       
    42 
       
    43 Initial
       
    44 
       
    45   $ setuprepos B.1
       
    46   creating test repo for test case B.1
       
    47   - pulldest
       
    48   - main
       
    49   - pushdest
       
    50   cd into `main` and proceed with env setup
       
    51   $ cd main
       
    52   $ mkcommit A
       
    53   $ mkcommit B
       
    54 
       
    55 make both changeset known in remote
       
    56 
       
    57   $ hg push -qf ../pushdest
       
    58   $ hg push -qf ../pulldest
       
    59 
       
    60 create prune marker
       
    61 
       
    62   $ hg prune -qd '0 0' .
       
    63   $ hg log -G --hidden
       
    64   x  f6fbb35d8ac9 (draft): B
       
    65   |
       
    66   @  f5bc6836db60 (draft): A
       
    67   |
       
    68   o  a9bdc8b26820 (public): O
       
    69   
       
    70   $ inspect_obsmarkers
       
    71   obsstore content
       
    72   ================
       
    73   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    74   obshashtree
       
    75   ===========
       
    76   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
       
    77   f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9
       
    78   f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021
       
    79   obshashrange
       
    80   ============
       
    81            rev         node        index         size        depth      obshash
       
    82              1 f5bc6836db60            0            2            2 926d9d84b97b
       
    83              0 a9bdc8b26820            0            1            1 000000000000
       
    84              1 f5bc6836db60            1            1            2 926d9d84b97b
       
    85   $ cd ..
       
    86   $ cd ..
       
    87 
       
    88 Actual Test
       
    89 -----------
       
    90 
       
    91   $ dotest B.1 O
       
    92   ## Running testcase B.1
       
    93   # testing echange of "O" (a9bdc8b26820)
       
    94   ## initial state
       
    95   # obstore: main
       
    96   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    97   # obstore: pushdest
       
    98   # obstore: pulldest
       
    99   ## pushing "O" from main to pushdest
       
   100   pushing to pushdest
       
   101   searching for changes
       
   102   no changes found
       
   103   ## post push state
       
   104   # obstore: main
       
   105   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   106   # obstore: pushdest
       
   107   # obstore: pulldest
       
   108   ## pulling "a9bdc8b26820" from main into pulldest
       
   109   pulling from main
       
   110   no changes found
       
   111   ## post pull state
       
   112   # obstore: main
       
   113   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   114   # obstore: pushdest
       
   115   # obstore: pulldest