2018-03-16 23:15:23 +03:00
|
|
|
$ . $TESTDIR/library.sh
|
|
|
|
|
|
|
|
setup configuration
|
|
|
|
|
|
|
|
$ setup_common_config
|
|
|
|
|
|
|
|
$ cd $TESTTMP
|
|
|
|
$ LONG_PATH='this/is/a/very/long/path/that/we/want/to/test/in/order/to/ensure/our/blobimport/as/well/as/mononoke/works/correctly/when/given/such/a/long/path/which/I/hope/will/have/enough/characters/for/the/purpose/of/testing/I/need/few/more/to/go/pass/255/chars'
|
|
|
|
$ LONG_FILENAME='this_is_a_very_long_file_name_that_we_want_to_test_in_order_to_ensure_our_blobimport_as_well_as_mononoke_works_correctly_when_given_such_a_long_path_which_I_hope_will_have_enough_characters_for_the_purpose_of_testing_I_need_few_more_to_go_pass_255_chars'
|
|
|
|
|
|
|
|
init repo-hg
|
|
|
|
|
|
|
|
$ hginit_treemanifest repo-hg
|
|
|
|
|
|
|
|
setup repo2 and repo3
|
|
|
|
|
|
|
|
$ hgclone_treemanifest ssh://user@dummy/repo-hg repo2
|
|
|
|
$ hgclone_treemanifest ssh://user@dummy/repo-hg repo3
|
|
|
|
|
|
|
|
setup repo-hg
|
|
|
|
|
|
|
|
$ cd repo-hg
|
|
|
|
$ mkdir -p ${LONG_PATH}
|
|
|
|
$ dd if=/dev/zero of=${LONG_PATH}/${LONG_FILENAME} bs=150M count=1
|
|
|
|
1+0 records in
|
|
|
|
1+0 records out
|
|
|
|
157286400 bytes (157 MB) copied, * (glob)
|
|
|
|
$ hg add ${LONG_PATH}/${LONG_FILENAME}
|
|
|
|
this/is/a/very/long/path/that/we/want/to/test/in/order/to/ensure/our/blobimport/as/well/as/mononoke/works/correctly/when/given/such/a/long/path/which/I/hope/will/have/enough/characters/for/the/purpose/of/testing/I/need/few/more/to/go/pass/255/chars/this_is_a_very_long_file_name_that_we_want_to_test_in_order_to_ensure_our_blobimport_as_well_as_mononoke_works_correctly_when_given_such_a_long_path_which_I_hope_will_have_enough_characters_for_the_purpose_of_testing_I_need_few_more_to_go_pass_255_chars: up to 471 MB of RAM may be required to manage this file
|
|
|
|
(use 'hg revert this/is/a/very/long/path/that/we/want/to/test/in/order/to/ensure/our/blobimport/as/well/as/mononoke/works/correctly/when/given/such/a/long/path/which/I/hope/will/have/enough/characters/for/the/purpose/of/testing/I/need/few/more/to/go/pass/255/chars/this_is_a_very_long_file_name_that_we_want_to_test_in_order_to_ensure_our_blobimport_as_well_as_mononoke_works_correctly_when_given_such_a_long_path_which_I_hope_will_have_enough_characters_for_the_purpose_of_testing_I_need_few_more_to_go_pass_255_chars' to cancel the pending addition)
|
|
|
|
$ hg ci -mlong
|
|
|
|
$ hg log
|
|
|
|
changeset: 0:bf1993b0fae3
|
|
|
|
tag: tip
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: long
|
|
|
|
|
|
|
|
|
|
|
|
check that the file created had both the content and path large enough to
|
|
|
|
create a hashed index and data revlogs
|
|
|
|
|
|
|
|
$ du .hg/store/dh/this/is/a/very/long/path/that/we/want/to/test/in/order/to/ensure/our/this_i75ebb3f31bf65e471c16ebbef3bc32a326d92ae6.i
|
|
|
|
4 .hg/store/dh/this/is/a/very/long/path/that/we/want/to/test/in/order/to/ensure/our/this_i75ebb3f31bf65e471c16ebbef3bc32a326d92ae6.i
|
|
|
|
$ du .hg/store/dh/this/is/a/very/long/path/that/we/want/to/test/in/order/to/ensure/our/this_i4680ea2a5b12ad9620ef7e598dcae10adf62b11c.d
|
|
|
|
152 .hg/store/dh/this/is/a/very/long/path/that/we/want/to/test/in/order/to/ensure/our/this_i4680ea2a5b12ad9620ef7e598dcae10adf62b11c.d
|
|
|
|
|
|
|
|
blobimport and start mononoke
|
|
|
|
|
|
|
|
$ cd $TESTTMP
|
2018-03-16 23:15:29 +03:00
|
|
|
$ blobimport repo-hg repo
|
2018-03-16 23:15:23 +03:00
|
|
|
$ mononoke -P $TESTTMP/mononoke-config -B test-config
|
|
|
|
$ wait_for_mononoke $TESTTMP/repo
|
|
|
|
|
|
|
|
pull on repo2
|
|
|
|
|
|
|
|
$ cd $TESTTMP/repo2
|
|
|
|
$ hgmn pull
|
|
|
|
pulling from ssh://user@dummy/repo
|
|
|
|
requesting all changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 1 changesets with 0 changes to 0 files
|
|
|
|
new changesets bf1993b0fae3
|
|
|
|
(run 'hg update' to get a working copy)
|
|
|
|
$ hgmn log
|
|
|
|
changeset: 0:bf1993b0fae3
|
|
|
|
tag: tip
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: long
|
|
|
|
|
|
|
|
$ hgmn update -r tip
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ du ${LONG_PATH}/${LONG_FILENAME}
|
|
|
|
153600 this/is/a/very/long/path/that/we/want/to/test/in/order/to/ensure/our/blobimport/as/well/as/mononoke/works/correctly/when/given/such/a/long/path/which/I/hope/will/have/enough/characters/for/the/purpose/of/testing/I/need/few/more/to/go/pass/255/chars/this_is_a_very_long_file_name_that_we_want_to_test_in_order_to_ensure_our_blobimport_as_well_as_mononoke_works_correctly_when_given_such_a_long_path_which_I_hope_will_have_enough_characters_for_the_purpose_of_testing_I_need_few_more_to_go_pass_255_chars
|
|
|
|
|
|
|
|
push one more long path from repo2
|
|
|
|
|
|
|
|
$ mkdir -p ${LONG_PATH}2
|
|
|
|
$ dd if=/dev/zero of=${LONG_PATH}2/${LONG_FILENAME}2 bs=151M count=1
|
|
|
|
1+0 records in
|
|
|
|
1+0 records out
|
|
|
|
158334976 bytes (158 MB) copied, * (glob)
|
|
|
|
$ hg add ${LONG_PATH}2/${LONG_FILENAME}2
|
|
|
|
this/is/a/very/long/path/that/we/want/to/test/in/order/to/ensure/our/blobimport/as/well/as/mononoke/works/correctly/when/given/such/a/long/path/which/I/hope/will/have/enough/characters/for/the/purpose/of/testing/I/need/few/more/to/go/pass/255/chars2/this_is_a_very_long_file_name_that_we_want_to_test_in_order_to_ensure_our_blobimport_as_well_as_mononoke_works_correctly_when_given_such_a_long_path_which_I_hope_will_have_enough_characters_for_the_purpose_of_testing_I_need_few_more_to_go_pass_255_chars2: up to 475 MB of RAM may be required to manage this file
|
|
|
|
(use 'hg revert this/is/a/very/long/path/that/we/want/to/test/in/order/to/ensure/our/blobimport/as/well/as/mononoke/works/correctly/when/given/such/a/long/path/which/I/hope/will/have/enough/characters/for/the/purpose/of/testing/I/need/few/more/to/go/pass/255/chars2/this_is_a_very_long_file_name_that_we_want_to_test_in_order_to_ensure_our_blobimport_as_well_as_mononoke_works_correctly_when_given_such_a_long_path_which_I_hope_will_have_enough_characters_for_the_purpose_of_testing_I_need_few_more_to_go_pass_255_chars2' to cancel the pending addition)
|
|
|
|
$ hg ci -mlong2
|
|
|
|
$ hg log
|
|
|
|
changeset: 1:fe4bdd54b7fa
|
|
|
|
tag: tip
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: long2
|
|
|
|
|
|
|
|
changeset: 0:bf1993b0fae3
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: long
|
|
|
|
|
|
|
|
$ hgmn push
|
|
|
|
pushing to ssh://user@dummy/repo
|
|
|
|
searching for changes
|
|
|
|
|
|
|
|
pull on repo3
|
|
|
|
|
|
|
|
$ cd $TESTTMP/repo3
|
|
|
|
$ hgmn pull
|
|
|
|
pulling from ssh://user@dummy/repo
|
|
|
|
requesting all changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 2 changesets with 0 changes to 0 files
|
|
|
|
new changesets bf1993b0fae3:fe4bdd54b7fa
|
|
|
|
(run 'hg update' to get a working copy)
|
|
|
|
$ hgmn log
|
|
|
|
changeset: 1:fe4bdd54b7fa
|
|
|
|
tag: tip
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: long2
|
|
|
|
|
|
|
|
changeset: 0:bf1993b0fae3
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: long
|
|
|
|
|
|
|
|
$ hgmn update -r tip
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ du ${LONG_PATH}/${LONG_FILENAME}
|
|
|
|
153600 this/is/a/very/long/path/that/we/want/to/test/in/order/to/ensure/our/blobimport/as/well/as/mononoke/works/correctly/when/given/such/a/long/path/which/I/hope/will/have/enough/characters/for/the/purpose/of/testing/I/need/few/more/to/go/pass/255/chars/this_is_a_very_long_file_name_that_we_want_to_test_in_order_to_ensure_our_blobimport_as_well_as_mononoke_works_correctly_when_given_such_a_long_path_which_I_hope_will_have_enough_characters_for_the_purpose_of_testing_I_need_few_more_to_go_pass_255_chars
|
|
|
|
$ du ${LONG_PATH}2/${LONG_FILENAME}2
|
|
|
|
154624 this/is/a/very/long/path/that/we/want/to/test/in/order/to/ensure/our/blobimport/as/well/as/mononoke/works/correctly/when/given/such/a/long/path/which/I/hope/will/have/enough/characters/for/the/purpose/of/testing/I/need/few/more/to/go/pass/255/chars2/this_is_a_very_long_file_name_that_we_want_to_test_in_order_to_ensure_our_blobimport_as_well_as_mononoke_works_correctly_when_given_such_a_long_path_which_I_hope_will_have_enough_characters_for_the_purpose_of_testing_I_need_few_more_to_go_pass_255_chars2
|