tests/test-exchange-D4.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 === D.4 Unknown changeset in between known one ===
       
     8 
       
     9 .. Mostly a clarification case
       
    10 ..
       
    11 .. {{{
       
    12 ..     ø⇠◌⇠○
       
    13 ..     | |/
       
    14 ..     | ◔
       
    15 ..     |/
       
    16 ..     ● O
       
    17 ..
       
    18 .. }}}
       
    19 ..
       
    20 .. Should be treated as A.3 case:
       
    21 ..
       
    22 .. {{{
       
    23 ..
       
    24 ..     ø⇠○
       
    25 ..     | |
       
    26 ..     | ◔
       
    27 ..     |/
       
    28 ..     ● O
       
    29 ..
       
    30 .. }}}
       
    31 
       
    32 
       
    33 initial
       
    34 
       
    35   $ setuprepos A.3.a
       
    36   creating test repo for test case A.3.a
       
    37   - pulldest
       
    38   - main
       
    39   - pushdest
       
    40   cd into `main` and proceed with env setup
       
    41   $ cd main
       
    42   $ mkcommit A0
       
    43   $ mkcommit B0
       
    44   $ hg update -q 0
       
    45   $ mkcommit A1
       
    46   created new head
       
    47   $ mkcommit B1
       
    48   $ hg debugobsolete `getid 'desc(A0)'` aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
       
    49   $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A1)'`
       
    50   $ hg debugobsolete `getid 'desc(B0)'` bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
       
    51   $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb `getid 'desc(B1)'`
       
    52   $ hg log -G --hidden
       
    53   @  069b05c3876d (draft): B1
       
    54   |
       
    55   o  e5ea8f9c7314 (draft): A1
       
    56   |
       
    57   | x  6e72f0a95b5e (draft): B0
       
    58   | |
       
    59   | x  28b51eb45704 (draft): A0
       
    60   |/
       
    61   o  a9bdc8b26820 (public): O
       
    62   
       
    63   $ hg debugobsolete
       
    64   28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    65   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    66   6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    67   bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    68   $ hg debugobsrelsethashtree
       
    69   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
       
    70   28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
       
    71   6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000
       
    72   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0aacc2f86e8fca29f2d5fd8d0790644620acd58a
       
    73   069b05c3876d56f62895e853a501ea58ea85f68d 40b98bc2b5b1152416ea8e9665ae1c6a3ce32ba0
       
    74   $ hg debugobshashrange --subranges --rev 'head()'
       
    75            rev         node        index         size        depth      obshash
       
    76              4 069b05c3876d            0            3            3 a2b2331da650
       
    77              3 e5ea8f9c7314            0            2            2 0aacc2f86e8f
       
    78              4 069b05c3876d            2            1            3 901f118d4333
       
    79              0 a9bdc8b26820            0            1            1 000000000000
       
    80              3 e5ea8f9c7314            1            1            2 0aacc2f86e8f
       
    81   $ cd ..
       
    82   $ cd ..
       
    83 
       
    84 Actual Test for first version (changeset unknown in remote)
       
    85 -----------------------------------------------------------
       
    86 
       
    87   $ dotest A.3.a A1
       
    88   ## Running testcase A.3.a
       
    89   # testing echange of "A1" (e5ea8f9c7314)
       
    90   ## initial state
       
    91   # obstore: main
       
    92   28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    93   6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    94   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    95   bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    96   # obstore: pushdest
       
    97   # obstore: pulldest
       
    98   ## pushing "A1" from main to pushdest
       
    99   pushing to pushdest
       
   100   searching for changes
       
   101   remote: adding changesets
       
   102   remote: adding manifests
       
   103   remote: adding file changes
       
   104   remote: added 1 changesets with 1 changes to 1 files
       
   105   remote: 2 new obsolescence markers
       
   106   ## post push state
       
   107   # obstore: main
       
   108   28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   109   6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   110   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   111   bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   112   # obstore: pushdest
       
   113   28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   114   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   115   # obstore: pulldest
       
   116   ## pulling "e5ea8f9c7314" from main into pulldest
       
   117   pulling from main
       
   118   searching for changes
       
   119   adding changesets
       
   120   adding manifests
       
   121   adding file changes
       
   122   added 1 changesets with 1 changes to 1 files
       
   123   2 new obsolescence markers
       
   124   (run 'hg update' to get a working copy)
       
   125   ## post pull state
       
   126   # obstore: main
       
   127   28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   128   6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   129   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   130   bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   131   # obstore: pushdest
       
   132   28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   133   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   134   # obstore: pulldest
       
   135   28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   136   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   137 
       
   138