tests/test-exchange-obsmarkers-case-B6.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.6
       
     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 6: Pruned changeset with precursors not in pushed set
       
    14 
       
    15 B.6 Pruned changeset with precursors not in pushed set
       
    16 ======================================================
       
    17 
       
    18 .. {{{
       
    19 ..   B ø⇠⊗ B'
       
    20 ..     | |
       
    21 ..   A ○ |
       
    22 ..     |/
       
    23 ..     ● O
       
    24 .. }}}
       
    25 ..
       
    26 .. Marker exist from:
       
    27 ..
       
    28 ..  * `B ø⇠⊗ B'`
       
    29 ..  * B' prune
       
    30 ..
       
    31 .. Command run:
       
    32 ..
       
    33 ..  * hg push -r O
       
    34 ..
       
    35 .. Expected exchange:
       
    36 ..
       
    37 ..  * `B ø⇠⊗ B'`
       
    38 ..  * B' prune
       
    39 
       
    40 Setup
       
    41 -----
       
    42 
       
    43   $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
       
    44 
       
    45 Initial
       
    46 
       
    47   $ setuprepos B.6
       
    48   creating test repo for test case B.6
       
    49   - pulldest
       
    50   - main
       
    51   - pushdest
       
    52   cd into `main` and proceed with env setup
       
    53   $ cd main
       
    54   $ mkcommit A
       
    55   $ mkcommit B0
       
    56   $ hg up --quiet 0
       
    57   $ mkcommit B1
       
    58   created new head
       
    59   $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'`
       
    60   $ hg prune -qd '0 0' .
       
    61   $ hg log -G --hidden
       
    62   x  f6298a8ac3a4 (draft): B1
       
    63   |
       
    64   | x  962ecf6b1afc (draft): B0
       
    65   | |
       
    66   | o  f5bc6836db60 (draft): A
       
    67   |/
       
    68   @  a9bdc8b26820 (public): O
       
    69   
       
    70   $ inspect_obsmarkers
       
    71   obsstore content
       
    72   ================
       
    73   962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    74   f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    75   obshashtree
       
    76   ===========
       
    77   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 86e41541149f4b6cccc5fd131d744d8e83a681e5
       
    78   f5bc6836db60e308a17ba08bf050154ba9c4fad7 f2e05412d3f1d5bc1ae647cf9efc43e0399c26ca
       
    79   962ecf6b1afc94e15c7e48fdfb76ef8abd11372b 974507d1c466d0aa86d288836194339ed3b98736
       
    80   f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 04e03a8959d8a39984e6a8f4a16fba975b364747
       
    81   obshashrange
       
    82   ============
       
    83            rev         node        index         size        depth      obshash
       
    84              1 f5bc6836db60            0            2            2 000000000000
       
    85              0 a9bdc8b26820            0            1            1 86e41541149f
       
    86              1 f5bc6836db60            1            1            2 000000000000
       
    87   $ cd ..
       
    88   $ cd ..
       
    89 
       
    90 Actual Test
       
    91 -------------------------------------
       
    92 
       
    93   $ dotest B.6 O
       
    94   ## Running testcase B.6
       
    95   # testing echange of "O" (a9bdc8b26820)
       
    96   ## initial state
       
    97   # obstore: main
       
    98   962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    99   f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   100   # obstore: pushdest
       
   101   # obstore: pulldest
       
   102   ## pushing "O" from main to pushdest
       
   103   pushing to pushdest
       
   104   searching for changes
       
   105   no changes found
       
   106   remote: 2 new obsolescence markers
       
   107   ## post push state
       
   108   # obstore: main
       
   109   962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   110   f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   111   # obstore: pushdest
       
   112   962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   113   f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   114   # obstore: pulldest
       
   115   ## pulling "a9bdc8b26820" from main into pulldest
       
   116   pulling from main
       
   117   no changes found
       
   118   2 new obsolescence markers
       
   119   ## post pull state
       
   120   # obstore: main
       
   121   962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   122   f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   123   # obstore: pushdest
       
   124   962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   125   f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   126   # obstore: pulldest
       
   127   962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   128   f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   129