sapling/tests/library.sh

59 lines
808 B
Bash
Raw Normal View History

${PYTHON:-python} -c 'import lz4' || exit 80
2013-09-04 07:03:43 +04:00
CACHEDIR=$PWD/hgcache
cat >> $HGRCPATH <<EOF
2013-09-04 07:03:43 +04:00
[remotefilelog]
cachepath=$CACHEDIR
debug=True
historypackv1=True
datapackversion=1
2013-09-04 07:03:43 +04:00
[extensions]
remotefilelog=
2013-09-04 07:03:43 +04:00
rebase=
mq=
2013-11-23 01:39:35 +04:00
[ui]
ssh=python "$TESTDIR/dummyssh"
[server]
preferuncompressed=True
[experimental]
changegroup3=True
[rebase]
singletransaction=True
2013-09-04 07:03:43 +04:00
EOF
hgcloneshallow() {
local name
local dest
2013-09-04 07:03:43 +04:00
orig=$1
shift
dest=$1
shift
hg clone --shallow --config remotefilelog.reponame=master $orig $dest $@
2013-09-04 07:03:43 +04:00
cat >> $dest/.hg/hgrc <<EOF
[remotefilelog]
reponame=master
datapackversion=1
2013-09-04 07:03:43 +04:00
EOF
}
hginit() {
local name
2013-09-04 07:03:43 +04:00
name=$1
shift
hg init $name $@
}
clearcache() {
2013-09-04 07:03:43 +04:00
rm -rf $CACHEDIR/*
}
mkcommit() {
echo "$1" > "$1"
hg add "$1"
hg ci -m "$1"
}
ls_l() {
$PYTHON $TESTDIR/ls-l.py "$@"
}