tests/test-exchange-C2.t
branchmercurial-4.0
changeset 2278 2db189baf8b7
parent 2260 e200dbfb4515
parent 2277 61d885899466
child 2279 347849e17876
child 2318 523855eb28c1
equal deleted inserted replaced
2260:e200dbfb4515 2278:2db189baf8b7
     1 
       
     2 
       
     3 Initial setup
       
     4 
       
     5   $ . $TESTDIR/testlib/exchange-util.sh
       
     6 
       
     7 === C.2 Pruned changeset on precursors ===
       
     8 
       
     9 .. {{{
       
    10 ..   B ⊗
       
    11 ..     |
       
    12 ..   A ø⇠◔ A'
       
    13 ..     |/
       
    14 ..     ● O
       
    15 .. }}}
       
    16 ..
       
    17 .. Marker exist from:
       
    18 ..
       
    19 ..  * A' succeed to A
       
    20 ..  * B (prune)
       
    21 ..
       
    22 .. Command run:
       
    23 ..
       
    24 ..  * hg push -r A'
       
    25 ..  * hg push
       
    26 ..
       
    27 .. Expected exchange:
       
    28 ..
       
    29 ..  * `A ø⇠o A'`
       
    30 ..  * B (prune)
       
    31 
       
    32   $ setuprepos C.2
       
    33   creating test repo for test case C.2
       
    34   - pulldest
       
    35   - main
       
    36   - pushdest
       
    37   cd into `main` and proceed with env setup
       
    38   $ cd main
       
    39   $ mkcommit A0
       
    40   $ mkcommit B
       
    41   $ hg prune -qd '0 0' .
       
    42   $ hg update -q 0
       
    43   $ mkcommit A1
       
    44   created new head
       
    45   $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
       
    46   $ hg log -G --hidden
       
    47   @  e5ea8f9c7314 (draft): A1
       
    48   |
       
    49   | x  06055a7959d4 (draft): B
       
    50   | |
       
    51   | x  28b51eb45704 (draft): A0
       
    52   |/
       
    53   o  a9bdc8b26820 (public): O
       
    54   
       
    55   $ hg debugobsolete
       
    56   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    57   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    58   $ hg debugobsrelsethashtree
       
    59   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
       
    60   28b51eb45704506b5c603decd6bf7ac5e0f6a52f 72f95b7b9fa12243aeb90433d211f2c38263da31
       
    61   06055a7959d4128e6e3bccfd01482e83a2db8a3a 58ecf9a107b10986d88da605eb0d03b7f24ae486
       
    62   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646
       
    63   $ hg debugobshashrange --subranges --rev 'head()'
       
    64            rev         node        index         size        depth      obshash
       
    65              3 e5ea8f9c7314            0            2            2 289cb0d058c8
       
    66              0 a9bdc8b26820            0            1            1 000000000000
       
    67              3 e5ea8f9c7314            1            1            2 289cb0d058c8
       
    68   $ cd ..
       
    69   $ cd ..
       
    70 
       
    71   $ cp -r C.2 C.2.a
       
    72   $ cp -r C.2 C.2.b
       
    73 
       
    74 Actual Test (explicit push)
       
    75 ---------------------------
       
    76 
       
    77   $ dotest C.2.a A1
       
    78   ## Running testcase C.2.a
       
    79   # testing echange of "A1" (e5ea8f9c7314)
       
    80   ## initial state
       
    81   # obstore: main
       
    82   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    83   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    84   # obstore: pushdest
       
    85   # obstore: pulldest
       
    86   ## pushing "A1" from main to pushdest
       
    87   pushing to pushdest
       
    88   searching for changes
       
    89   remote: adding changesets
       
    90   remote: adding manifests
       
    91   remote: adding file changes
       
    92   remote: added 1 changesets with 1 changes to 1 files
       
    93   remote: 2 new obsolescence markers
       
    94   ## post push state
       
    95   # obstore: main
       
    96   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    97   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    98   # obstore: pushdest
       
    99   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   100   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   101   # obstore: pulldest
       
   102   ## pulling "e5ea8f9c7314" from main into pulldest
       
   103   pulling from main
       
   104   searching for changes
       
   105   adding changesets
       
   106   adding manifests
       
   107   adding file changes
       
   108   added 1 changesets with 1 changes to 1 files
       
   109   2 new obsolescence markers
       
   110   (run 'hg update' to get a working copy)
       
   111   ## post pull state
       
   112   # obstore: main
       
   113   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   114   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   115   # obstore: pushdest
       
   116   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   117   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   118   # obstore: pulldest
       
   119   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   120   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   121 
       
   122 Actual Test (bare push)
       
   123 -------------------------------------
       
   124 
       
   125   $ dotest C.2.b
       
   126   ## Running testcase C.2.b
       
   127   ## initial state
       
   128   # obstore: main
       
   129   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   130   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   131   # obstore: pushdest
       
   132   # obstore: pulldest
       
   133   ## pushing from main to pushdest
       
   134   pushing to pushdest
       
   135   searching for changes
       
   136   remote: adding changesets
       
   137   remote: adding manifests
       
   138   remote: adding file changes
       
   139   remote: added 1 changesets with 1 changes to 1 files
       
   140   remote: 2 new obsolescence markers
       
   141   ## post push state
       
   142   # obstore: main
       
   143   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   144   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   145   # obstore: pushdest
       
   146   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   147   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   148   # obstore: pulldest
       
   149   ## pulling from main into pulldest
       
   150   pulling from main
       
   151   searching for changes
       
   152   adding changesets
       
   153   adding manifests
       
   154   adding file changes
       
   155   added 1 changesets with 1 changes to 1 files
       
   156   2 new obsolescence markers
       
   157   (run 'hg update' to get a working copy)
       
   158   ## post pull state
       
   159   # obstore: main
       
   160   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   161   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   162   # obstore: pushdest
       
   163   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   164   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   165   # obstore: pulldest
       
   166   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   167   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}