tests/test-persistent-nodemap-stream-clone.t
branchstable
changeset 50722 7e5be4a7cda7
parent 50709 517fcefe8a39
equal deleted inserted replaced
50721:a10d823a8e3d 50722:7e5be4a7cda7
    41 Simple case
    41 Simple case
    42 -----------
    42 -----------
    43 
    43 
    44 No race condition
    44 No race condition
    45 
    45 
    46   $ hg clone -U --stream ssh://user@dummy/test-repo stream-clone --debug | egrep '00(changelog|manifest)'
    46   $ hg clone -U --stream ssh://user@dummy/test-repo stream-clone --debug | grep -E '00(changelog|manifest)'
    47   adding [s] 00manifest.n (62 bytes)
    47   adding [s] 00manifest.n (62 bytes)
    48   adding [s] 00manifest-*.nd (118 KB) (glob)
    48   adding [s] 00manifest-*.nd (118 KB) (glob)
    49   adding [s] 00manifest.d (4?? KB) (glob)
    49   adding [s] 00manifest.d (4?? KB) (glob)
    50   adding [s] 00manifest.i (313 KB)
    50   adding [s] 00manifest.i (313 KB)
    51   adding [s] 00changelog.n (62 bytes)
    51   adding [s] 00changelog.n (62 bytes)
    52   adding [s] 00changelog-*.nd (118 KB) (glob)
    52   adding [s] 00changelog-*.nd (118 KB) (glob)
    53   adding [s] 00changelog.d (3?? KB) (glob)
    53   adding [s] 00changelog.d (3?? KB) (glob)
    54   adding [s] 00changelog.i (313 KB)
    54   adding [s] 00changelog.i (313 KB)
    55   $ ls -1 stream-clone/.hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
    55   $ ls -1 stream-clone/.hg/store/ | grep -E '00(changelog|manifest)(\.n|-.*\.nd)'
    56   00changelog-*.nd (glob)
    56   00changelog-*.nd (glob)
    57   00changelog.n
    57   00changelog.n
    58   00manifest-*.nd (glob)
    58   00manifest-*.nd (glob)
    59   00manifest.n
    59   00manifest.n
    60   $ hg -R stream-clone debugnodemap --metadata
    60   $ hg -R stream-clone debugnodemap --metadata
   110   $ echo foo >> test-repo/foo
   110   $ echo foo >> test-repo/foo
   111   $ hg -R test-repo/ add test-repo/foo
   111   $ hg -R test-repo/ add test-repo/foo
   112 
   112 
   113 Do a mix of clone and commit at the same time so that the file listed on disk differ at actual transfer time.
   113 Do a mix of clone and commit at the same time so that the file listed on disk differ at actual transfer time.
   114 
   114 
   115   $ (hg clone -U --stream ssh://user@dummy/test-repo stream-clone-race-1 --debug 2>> clone-output | egrep '00(changelog|manifest)' >> clone-output; touch $HG_TEST_STREAM_WALKED_FILE_3) &
   115   $ (hg clone -U --stream ssh://user@dummy/test-repo stream-clone-race-1 --debug 2>> clone-output | grep -E '00(changelog|manifest)' >> clone-output; touch $HG_TEST_STREAM_WALKED_FILE_3) &
   116   $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1
   116   $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1
   117   $ hg -R test-repo/ commit -m foo
   117   $ hg -R test-repo/ commit -m foo
   118   created new head
   118   created new head
   119   $ touch $HG_TEST_STREAM_WALKED_FILE_2
   119   $ touch $HG_TEST_STREAM_WALKED_FILE_2
   120   $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3
   120   $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3
   209   data-unused: 0.000% (no-pure no-rust !)
   209   data-unused: 0.000% (no-pure no-rust !)
   210 
   210 
   211 Performe the mix of clone and full refresh of the nodemap, so that the files
   211 Performe the mix of clone and full refresh of the nodemap, so that the files
   212 (and filenames) are different between listing time and actual transfer time.
   212 (and filenames) are different between listing time and actual transfer time.
   213 
   213 
   214   $ (hg clone -U --stream ssh://user@dummy/test-repo stream-clone-race-2 --debug 2>> clone-output-2 | egrep '00(changelog|manifest)' >> clone-output-2; touch $HG_TEST_STREAM_WALKED_FILE_3) &
   214   $ (hg clone -U --stream ssh://user@dummy/test-repo stream-clone-race-2 --debug 2>> clone-output-2 | grep -E '00(changelog|manifest)' >> clone-output-2; touch $HG_TEST_STREAM_WALKED_FILE_3) &
   215   $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1
   215   $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1
   216   $ rm test-repo/.hg/store/00changelog.n
   216   $ rm test-repo/.hg/store/00changelog.n
   217   $ rm test-repo/.hg/store/00changelog-*.nd
   217   $ rm test-repo/.hg/store/00changelog-*.nd
   218   $ hg -R test-repo/ debugupdatecache
   218   $ hg -R test-repo/ debugupdatecache
   219   $ touch $HG_TEST_STREAM_WALKED_FILE_2
   219   $ touch $HG_TEST_STREAM_WALKED_FILE_2