sapling/tests/library.sh
Durham Goode 5282ddbf02 hg: add test for setting treemanifest.sendtrees=True
Summary:
I will be enabling this config on its own more broadly soon. Let's add
a test just to verify it works without treeonly=True being set (which is what
most other tests already test).

Reviewed By: quark-zju

Differential Revision: D7004366

fbshipit-source-id: 5743fbfd23da7327d1779f8555c42a8845d60271
2018-04-13 21:51:13 -07:00

85 lines
1.2 KiB
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
[phases]
publish=False
EOF
}
hgcloneshallowlfs() {
local name
local dest
local lfsdir
orig=$1
shift
dest=$1
shift
lfsdir=$1
shift
hg clone --shallow --config "extensions.lfs=" --config "lfs.url=$lfsdir" --config remotefilelog.reponame=master $orig $dest $@
cat >> $dest/.hg/hgrc <<EOF
[extensions]
lfs=
[lfs]
url=$lfsdir
[remotefilelog]
reponame=master
datapackversion=1
[phases]
publish=False
EOF
}
hginit() {
local name
name=$1
shift
hg init $name $@ --config remotefilelog.reponame=master
}
clearcache() {
rm -rf $CACHEDIR/*
}
mkcommit() {
echo "$1" > "$1"
hg add "$1"
hg ci -m "$1"
}
ls_l() {
$PYTHON $TESTDIR/ls-l.py "$@"
}