tests/test-exchange-obsmarkers-case-D1.t
branchstable
changeset 2268 f2ebe960998b
parent 2230 a202f3af890c
child 2560 0deafa671152
equal deleted inserted replaced
2267:150fee60887a 2268:f2ebe960998b
       
     1 ============================================
       
     2 Testing obsolescence markers push: Cases D.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 D: Partial Information Case
       
    13 TestCase 1: Pruned changeset based on missing precursor of something not present
       
    14 Variants:
       
    15 # a: explicite push
       
    16 # b: bare push
       
    17 
       
    18 D.1 Pruned changeset based on missing precursor of something not present
       
    19 ========================================================================
       
    20 
       
    21 .. {{{
       
    22 ..   B ⊗
       
    23 ..     |
       
    24 ..   A ◌⇠◔ A'
       
    25 ..     |/
       
    26 ..     ● O
       
    27 .. }}}
       
    28 ..
       
    29 .. Markers exist from:
       
    30 ..
       
    31 ..  * `A ø⇠o A'`
       
    32 ..  * B (prune)
       
    33 ..
       
    34 .. Command run:
       
    35 ..
       
    36 ..  * hg push -r A'
       
    37 ..  * hg push
       
    38 ..
       
    39 .. Expected exchange:
       
    40 ..
       
    41 ..  * `A ø⇠o A'`
       
    42 ..  * B (prune)
       
    43 
       
    44 Setup
       
    45 -----
       
    46 
       
    47   $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
       
    48 
       
    49 initial
       
    50 
       
    51   $ setuprepos D.1
       
    52   creating test repo for test case D.1
       
    53   - pulldest
       
    54   - main
       
    55   - pushdest
       
    56   cd into `main` and proceed with env setup
       
    57   $ cd main
       
    58   $ mkcommit A0
       
    59   $ mkcommit B
       
    60   $ hg up -q 0
       
    61   $ mkcommit A1
       
    62   created new head
       
    63   $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
       
    64   $ hg prune -d '0 0' 'desc(B)'
       
    65   1 changesets pruned
       
    66   $ hg strip --hidden -q 'desc(A0)'
       
    67   $ hg log -G --hidden
       
    68   @  e5ea8f9c7314 (draft): A1
       
    69   |
       
    70   o  a9bdc8b26820 (public): O
       
    71   
       
    72   $ inspect_obsmarkers
       
    73   obsstore content
       
    74   ================
       
    75   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    76   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    77   obshashtree
       
    78   ===========
       
    79   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
       
    80   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646
       
    81   obshashrange
       
    82   ============
       
    83            rev         node        index         size        depth      obshash
       
    84              1 e5ea8f9c7314            0            2            2 289cb0d058c8
       
    85              0 a9bdc8b26820            0            1            1 000000000000
       
    86              1 e5ea8f9c7314            1            1            2 289cb0d058c8
       
    87   $ cd ..
       
    88   $ cd ..
       
    89 
       
    90   $ cp -R D.1 D.1.a
       
    91   $ cp -R D.1 D.1.b
       
    92 
       
    93 Actual Test (explicit push)
       
    94 ---------------------------
       
    95 
       
    96   $ dotest D.1.a A1
       
    97   ## Running testcase D.1.a
       
    98   # testing echange of "A1" (e5ea8f9c7314)
       
    99   ## initial state
       
   100   # obstore: main
       
   101   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   102   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   103   # obstore: pushdest
       
   104   # obstore: pulldest
       
   105   ## pushing "A1" from main to pushdest
       
   106   pushing to pushdest
       
   107   searching for changes
       
   108   remote: adding changesets
       
   109   remote: adding manifests
       
   110   remote: adding file changes
       
   111   remote: added 1 changesets with 1 changes to 1 files
       
   112   remote: 2 new obsolescence markers
       
   113   ## post push state
       
   114   # obstore: main
       
   115   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   116   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   117   # obstore: pushdest
       
   118   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   119   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   120   # obstore: pulldest
       
   121   ## pulling "e5ea8f9c7314" from main into pulldest
       
   122   pulling from main
       
   123   searching for changes
       
   124   adding changesets
       
   125   adding manifests
       
   126   adding file changes
       
   127   added 1 changesets with 1 changes to 1 files
       
   128   2 new obsolescence markers
       
   129   (run 'hg update' to get a working copy)
       
   130   ## post pull state
       
   131   # obstore: main
       
   132   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   133   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   134   # obstore: pushdest
       
   135   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   136   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   137   # obstore: pulldest
       
   138   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   139   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   140 
       
   141 Actual Test (base push)
       
   142 ---------------------------
       
   143 
       
   144   $ dotest D.1.b
       
   145   ## Running testcase D.1.b
       
   146   ## initial state
       
   147   # obstore: main
       
   148   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   149   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   150   # obstore: pushdest
       
   151   # obstore: pulldest
       
   152   ## pushing from main to pushdest
       
   153   pushing to pushdest
       
   154   searching for changes
       
   155   remote: adding changesets
       
   156   remote: adding manifests
       
   157   remote: adding file changes
       
   158   remote: added 1 changesets with 1 changes to 1 files
       
   159   remote: 2 new obsolescence markers
       
   160   ## post push state
       
   161   # obstore: main
       
   162   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   163   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   164   # obstore: pushdest
       
   165   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   166   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   167   # obstore: pulldest
       
   168   ## pulling from main into pulldest
       
   169   pulling from main
       
   170   searching for changes
       
   171   adding changesets
       
   172   adding manifests
       
   173   adding file changes
       
   174   added 1 changesets with 1 changes to 1 files
       
   175   2 new obsolescence markers
       
   176   (run 'hg update' to get a working copy)
       
   177   ## post pull state
       
   178   # obstore: main
       
   179   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   180   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   181   # obstore: pushdest
       
   182   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   183   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   184   # obstore: pulldest
       
   185   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   186   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   187