mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
79639557a1
Summary: Previously the code required that sizes be of type int. Since python plays loose with integer types, we also need to support long. Test Plan: The existing test-remotefilelog-repack-fast.t test was completely broken. It only enabled fast datapacks for the server repo, not the clients. Enabling it for the clients as well catches this issue and verifies the fix. Reviewers: #fbhgext, quark Reviewed By: #fbhgext, quark Differential Revision: https://phab.mercurial-scm.org/D54
59 lines
808 B
Bash
59 lines
808 B
Bash
${PYTHON:-python} -c 'import lz4' || exit 80
|
|
|
|
CACHEDIR=$PWD/hgcache
|
|
cat >> $HGRCPATH <<EOF
|
|
[remotefilelog]
|
|
cachepath=$CACHEDIR
|
|
debug=True
|
|
historypackv1=True
|
|
datapackversion=1
|
|
[extensions]
|
|
remotefilelog=
|
|
rebase=
|
|
mq=
|
|
[ui]
|
|
ssh=python "$TESTDIR/dummyssh"
|
|
[server]
|
|
preferuncompressed=True
|
|
[experimental]
|
|
changegroup3=True
|
|
[rebase]
|
|
singletransaction=True
|
|
EOF
|
|
|
|
hgcloneshallow() {
|
|
local name
|
|
local dest
|
|
orig=$1
|
|
shift
|
|
dest=$1
|
|
shift
|
|
hg clone --shallow --config remotefilelog.reponame=master $orig $dest $@
|
|
cat >> $dest/.hg/hgrc <<EOF
|
|
[remotefilelog]
|
|
reponame=master
|
|
datapackversion=1
|
|
EOF
|
|
}
|
|
|
|
hginit() {
|
|
local name
|
|
name=$1
|
|
shift
|
|
hg init $name $@
|
|
}
|
|
|
|
clearcache() {
|
|
rm -rf $CACHEDIR/*
|
|
}
|
|
|
|
mkcommit() {
|
|
echo "$1" > "$1"
|
|
hg add "$1"
|
|
hg ci -m "$1"
|
|
}
|
|
|
|
ls_l() {
|
|
$PYTHON $TESTDIR/ls-l.py "$@"
|
|
}
|