tests/test-exchange-B1.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 === B.1 Prune on non-targeted common changeset ===
       
     7 
       
     8 .. {{{
       
     9 ..     ⊗ B
       
    10 ..     |
       
    11 ..     ◕ A
       
    12 ..     |
       
    13 ..     ● O
       
    14 .. }}}
       
    15 ..
       
    16 .. Marker exist from:
       
    17 ..
       
    18 ..  * B (prune)
       
    19 ..
       
    20 .. Command run:
       
    21 ..
       
    22 ..  * hg push -r O
       
    23 ..  * hg push
       
    24 ..
       
    25 .. Expected exchange:
       
    26 ..
       
    27 ..  * B (prune)
       
    28 
       
    29 
       
    30   $ setuprepos B.1
       
    31   creating test repo for test case B.1
       
    32   - pulldest
       
    33   - main
       
    34   - pushdest
       
    35   cd into `main` and proceed with env setup
       
    36   $ cd main
       
    37   $ mkcommit A
       
    38   $ mkcommit B
       
    39   $ hg prune -qd '0 0' .
       
    40   $ hg log -G --hidden
       
    41   x  f6fbb35d8ac9 (draft): B
       
    42   |
       
    43   @  f5bc6836db60 (draft): A
       
    44   |
       
    45   o  a9bdc8b26820 (public): O
       
    46   
       
    47   $ hg debugobsolete
       
    48   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    49   $ hg debugobsrelsethashtree
       
    50   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
       
    51   f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9
       
    52   f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021
       
    53   $ hg debugobshashrange --subranges --rev 'head()'
       
    54            rev         node        index         size        depth      obshash
       
    55              1 f5bc6836db60            0            2            2 926d9d84b97b
       
    56              0 a9bdc8b26820            0            1            1 000000000000
       
    57              1 f5bc6836db60            1            1            2 926d9d84b97b
       
    58   $ cd ..
       
    59   $ cd ..
       
    60 
       
    61 
       
    62   $ cp -r B.1 B.1.a
       
    63   $ cp -r B.1 B.1.b
       
    64 
       
    65 Actual Test (explicit push version)
       
    66 -----------------------------------
       
    67 
       
    68   $ dotest B.1.a A
       
    69   ## Running testcase B.1.a
       
    70   # testing echange of "A" (f5bc6836db60)
       
    71   ## initial state
       
    72   # obstore: main
       
    73   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    74   # obstore: pushdest
       
    75   # obstore: pulldest
       
    76   ## pushing "A" from main to pushdest
       
    77   pushing to pushdest
       
    78   searching for changes
       
    79   remote: adding changesets
       
    80   remote: adding manifests
       
    81   remote: adding file changes
       
    82   remote: added 1 changesets with 1 changes to 1 files
       
    83   remote: 1 new obsolescence markers
       
    84   ## post push state
       
    85   # obstore: main
       
    86   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    87   # obstore: pushdest
       
    88   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
    89   # obstore: pulldest
       
    90   ## pulling "f5bc6836db60" from main into pulldest
       
    91   pulling from main
       
    92   searching for changes
       
    93   adding changesets
       
    94   adding manifests
       
    95   adding file changes
       
    96   added 1 changesets with 1 changes to 1 files
       
    97   1 new obsolescence markers
       
    98   (run 'hg update' to get a working copy)
       
    99   ## post pull state
       
   100   # obstore: main
       
   101   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   102   # obstore: pushdest
       
   103   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   104   # obstore: pulldest
       
   105   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   106 
       
   107 Actual Test (bare push version)
       
   108 -----------------------------------
       
   109 
       
   110   $ dotest B.1.b
       
   111   ## Running testcase B.1.b
       
   112   ## initial state
       
   113   # obstore: main
       
   114   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   115   # obstore: pushdest
       
   116   # obstore: pulldest
       
   117   ## pushing from main to pushdest
       
   118   pushing to pushdest
       
   119   searching for changes
       
   120   remote: adding changesets
       
   121   remote: adding manifests
       
   122   remote: adding file changes
       
   123   remote: added 1 changesets with 1 changes to 1 files
       
   124   remote: 1 new obsolescence markers
       
   125   ## post push state
       
   126   # obstore: main
       
   127   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   128   # obstore: pushdest
       
   129   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   130   # obstore: pulldest
       
   131   ## pulling from main into pulldest
       
   132   pulling from main
       
   133   searching for changes
       
   134   adding changesets
       
   135   adding manifests
       
   136   adding file changes
       
   137   added 1 changesets with 1 changes to 1 files
       
   138   1 new obsolescence markers
       
   139   (run 'hg update' to get a working copy)
       
   140   ## post pull state
       
   141   # obstore: main
       
   142   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   143   # obstore: pushdest
       
   144   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
       
   145   # obstore: pulldest
       
   146   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}