sapling/tests/library.sh
Durham Goode 79639557a1 datapack: allow 'long' for metadata types
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
2017-07-11 17:02:15 -07:00

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 "$@"
}