tests/test-exchange-obsmarkers-case-B2.t
changeset 31914 c8e5370ab4ba
equal deleted inserted replaced
31913:850a06176d82 31914:c8e5370ab4ba
       
     1 ============================================
       
     2 Testing obsolescence markers push: Cases B.2
       
     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 2: Prune on targeted common changeset
       
    14 Variants:
       
    15 # a: explicite push
       
    16 # b: bare push
       
    17 
       
    18 B.2 Pruned changeset on head: nothing pushed
       
    19 ============================================
       
    20 
       
    21 .. {{{
       
    22 ..     ⊗ A
       
    23 ..     |
       
    24 ..     ● O
       
    25 .. }}}
       
    26 ..
       
    27 .. Marker exist from:
       
    28 ..
       
    29 ..  * A (prune)
       
    30 ..
       
    31 .. Command run:
       
    32 ..
       
    33 ..  * hg push -r O
       
    34 ..  * hg push
       
    35 ..
       
    36 .. Expected exchange:
       
    37 ..
       
    38 ..  * prune marker for A
       
    39 
       
    40 Setup
       
    41 -----
       
    42 
       
    43   $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
       
    44 
       
    45 Initial
       
    46 
       
    47   $ setuprepos B.2
       
    48   creating test repo for test case B.2
       
    49   - pulldest
       
    50   - main
       
    51   - pushdest
       
    52   cd into `main` and proceed with env setup
       
    53   $ cd main
       
    54   $ mkcommit A
       
    55   $ hg prune -qd '0 0' .
       
    56   $ hg log -G --hidden
       
    57   x  f5bc6836db60 (draft): A
       
    58   |
       
    59   @  a9bdc8b26820 (public): O
       
    60   
       
    61   $ inspect_obsmarkers
       
    62   obsstore content
       
    63   ================
       
    64   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    65   $ cd ..
       
    66   $ cd ..
       
    67 
       
    68   $ cp -R B.2 B.2.a
       
    69   $ cp -R B.2 B.2.b
       
    70 
       
    71 Actual Test (explicit push version)
       
    72 -----------------------------------
       
    73 
       
    74   $ dotest B.2.a O
       
    75   ## Running testcase B.2.a
       
    76   # testing echange of "O" (a9bdc8b26820)
       
    77   ## initial state
       
    78   # obstore: main
       
    79   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    80   # obstore: pushdest
       
    81   # obstore: pulldest
       
    82   ## pushing "O" from main to pushdest
       
    83   pushing to pushdest
       
    84   searching for changes
       
    85   no changes found
       
    86   remote: 1 new obsolescence markers
       
    87   ## post push state
       
    88   # obstore: main
       
    89   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    90   # obstore: pushdest
       
    91   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    92   # obstore: pulldest
       
    93   ## pulling "a9bdc8b26820" from main into pulldest
       
    94   pulling from main
       
    95   no changes found
       
    96   1 new obsolescence markers
       
    97   ## post pull state
       
    98   # obstore: main
       
    99   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   100   # obstore: pushdest
       
   101   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   102   # obstore: pulldest
       
   103   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   104 
       
   105 Actual Test (bare push version)
       
   106 -----------------------------------
       
   107 
       
   108   $ dotest B.2.b
       
   109   ## Running testcase B.2.b
       
   110   ## initial state
       
   111   # obstore: main
       
   112   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   113   # obstore: pushdest
       
   114   # obstore: pulldest
       
   115   ## pushing from main to pushdest
       
   116   pushing to pushdest
       
   117   searching for changes
       
   118   no changes found
       
   119   remote: 1 new obsolescence markers
       
   120   ## post push state
       
   121   # obstore: main
       
   122   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   123   # obstore: pushdest
       
   124   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   125   # obstore: pulldest
       
   126   ## pulling from main into pulldest
       
   127   pulling from main
       
   128   searching for changes
       
   129   no changes found
       
   130   1 new obsolescence markers
       
   131   ## post pull state
       
   132   # obstore: main
       
   133   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   134   # obstore: pushdest
       
   135   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   136   # obstore: pulldest
       
   137   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}