tests/test-exchange-A4.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 Initial setup
       
     3 
       
     4   $ . $TESTDIR/testlib/exchange-util.sh
       
     5 
       
     6 
       
     7 === A.4 Push in the middle of the obsolescence chain ===
       
     8 
       
     9 .. (Where we show that we should not push the marker without the successors)
       
    10 ..
       
    11 .. {{{
       
    12 ..   B ◔
       
    13 ..     |
       
    14 ..   A⇠ø⇠○ A'
       
    15 ..     |/
       
    16 ..     ● O
       
    17 .. }}}
       
    18 ..
       
    19 .. Marker exist from:
       
    20 ..
       
    21 ..  * `Aø⇠○ A'`
       
    22 ..  * chain from A
       
    23 ..
       
    24 .. Command run:
       
    25 ..
       
    26 ..  * hg push -r B
       
    27 ..
       
    28 .. Expected exchange:
       
    29 ..
       
    30 ..  * Chain from A
       
    31 ..
       
    32 .. Expected Exclude:
       
    33 ..
       
    34 ..  * `Aø⇠○ A'`
       
    35 
       
    36 
       
    37 initial
       
    38 
       
    39   $ setuprepos A.4
       
    40   creating test repo for test case A.4
       
    41   - pulldest
       
    42   - main
       
    43   - pushdest
       
    44   cd into `main` and proceed with env setup
       
    45   $ cd main
       
    46   $ mkcommit A0
       
    47   $ mkcommit B
       
    48   $ hg update 0
       
    49   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
       
    50   $ mkcommit A1
       
    51   created new head
       
    52   $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A0)'`
       
    53   $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
       
    54   $ hg log -G --hidden
       
    55   @  e5ea8f9c7314 (draft): A1
       
    56   |
       
    57   | o  06055a7959d4 (draft): B
       
    58   | |
       
    59   | x  28b51eb45704 (draft): A0
       
    60   |/
       
    61   o  a9bdc8b26820 (public): O
       
    62   
       
    63   $ hg debugobsolete
       
    64   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    65   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    66   $ hg debugobsrelsethashtree
       
    67   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
       
    68   28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76
       
    69   06055a7959d4128e6e3bccfd01482e83a2db8a3a fd3e5712c9c2d216547d7a1b87ac815ee1fb7542
       
    70   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 cf518031fa753e9b049d727e6b0e19f645bab38f
       
    71   $ hg debugobshashrange --subranges --rev 'head()'
       
    72            rev         node        index         size        depth      obshash
       
    73              2 06055a7959d4            0            3            3 000000000000
       
    74              1 28b51eb45704            0            2            2 5d69322fad9e
       
    75              3 e5ea8f9c7314            0            2            2 cf518031fa75
       
    76              2 06055a7959d4            2            1            3 000000000000
       
    77              1 28b51eb45704            1            1            2 5d69322fad9e
       
    78              0 a9bdc8b26820            0            1            1 000000000000
       
    79              3 e5ea8f9c7314            1            1            2 cf518031fa75
       
    80   $ cd ..
       
    81   $ cd ..
       
    82 
       
    83 Actual Test for first version (changeset unknown in remote)
       
    84 -----------------------------------------------------------
       
    85 
       
    86   $ dotest A.4 B -f
       
    87   ## Running testcase A.4
       
    88   # testing echange of "B" (06055a7959d4)
       
    89   ## initial state
       
    90   # obstore: main
       
    91   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    92   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    93   # obstore: pushdest
       
    94   # obstore: pulldest
       
    95   ## pushing "B" from main to pushdest
       
    96   pushing to pushdest
       
    97   searching for changes
       
    98   remote: adding changesets
       
    99   remote: adding manifests
       
   100   remote: adding file changes
       
   101   remote: added 2 changesets with 2 changes to 2 files
       
   102   remote: 1 new obsolescence markers
       
   103   ## post push state
       
   104   # obstore: main
       
   105   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   106   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   107   # obstore: pushdest
       
   108   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   109   # obstore: pulldest
       
   110   ## pulling "06055a7959d4" from main into pulldest
       
   111   pulling from main
       
   112   searching for changes
       
   113   adding changesets
       
   114   adding manifests
       
   115   adding file changes
       
   116   added 2 changesets with 2 changes to 2 files
       
   117   1 new obsolescence markers
       
   118   (run 'hg update' to get a working copy)
       
   119   ## post pull state
       
   120   # obstore: main
       
   121   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   122   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   123   # obstore: pushdest
       
   124   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   125   # obstore: pulldest
       
   126   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}