mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
f3b41ee3a9
Summary: Not very useful on today's hardware. Reviewed By: quark-zju Differential Revision: D19783741 fbshipit-source-id: d8ff29486cdc5f8e31d929d9fbba827e37012381
145 lines
6.1 KiB
Perl
145 lines
6.1 KiB
Perl
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License found in the LICENSE file in the root
|
|
# directory of this source tree.
|
|
|
|
$ . "${TEST_FIXTURES}/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* (glob)
|
|
$ hg add ${LONG_PATH}/${LONG_FILENAME}
|
|
$ hg ci -mlong
|
|
$ hg log
|
|
changeset: 0:b8119d283b73
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: long
|
|
(re)
|
|
|
|
create master bookmark
|
|
$ hg bookmark master_bookmark -r tip
|
|
|
|
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|156) .hg/store/dh/this/is/a/very/long/path/that/we/want/to/test/in/order/to/ensure/our/this_i4680ea2a5b12ad9620ef7e598dcae10adf62b11c.d (re)
|
|
|
|
blobimport and start mononoke
|
|
|
|
$ cd $TESTTMP
|
|
$ blobimport repo-hg/.hg repo
|
|
$ mononoke
|
|
$ wait_for_mononoke
|
|
|
|
pull on repo2
|
|
|
|
$ cd $TESTTMP/repo2
|
|
$ hgmn pull
|
|
pulling from ssh://user@dummy/repo
|
|
warning: stream clone requested but client is missing requirements: lz4revlog
|
|
(see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
|
|
requesting all changes
|
|
adding changesets
|
|
adding manifests
|
|
adding file changes
|
|
added 1 changesets with 0 changes to 0 files
|
|
adding remote bookmark master_bookmark
|
|
$ hgmn log
|
|
changeset: 0:b8119d283b73
|
|
bookmark: master_bookmark
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: long
|
|
(re)
|
|
$ hgmn update -r master_bookmark
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
(activating bookmark master_bookmark)
|
|
$ 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* (glob)
|
|
$ hg add ${LONG_PATH}2/${LONG_FILENAME}2
|
|
$ hg ci -mlong2
|
|
$ hg log
|
|
changeset: 1:8fffbbe6af55
|
|
bookmark: master_bookmark
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: long2
|
|
(re)
|
|
changeset: 0:b8119d283b73
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: long
|
|
(re)
|
|
$ hgmn push
|
|
pushing to ssh://user@dummy/repo
|
|
searching for changes
|
|
updating bookmark master_bookmark
|
|
|
|
pull on repo3
|
|
|
|
$ cd $TESTTMP/repo3
|
|
$ hgmn pull
|
|
pulling from ssh://user@dummy/repo
|
|
warning: stream clone requested but client is missing requirements: lz4revlog
|
|
(see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
|
|
requesting all changes
|
|
adding changesets
|
|
adding manifests
|
|
adding file changes
|
|
added 2 changesets with 0 changes to 0 files
|
|
adding remote bookmark master_bookmark
|
|
$ hgmn log
|
|
changeset: 1:8fffbbe6af55
|
|
bookmark: master_bookmark
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: long2
|
|
(re)
|
|
changeset: 0:b8119d283b73
|
|
user: test
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
summary: long
|
|
(re)
|
|
$ hgmn update -r master_bookmark
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
(activating bookmark master_bookmark)
|
|
$ 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
|