##// END OF EJS Templates
tests: setup dummyssh as the default ssh...
tests: setup dummyssh as the default ssh To significantly reduce boilerplate in tests. One test is updated to show that it works, I expect to do the rest in follow up commits. Differential Revision: https://phab.mercurial-scm.org/D11244

File last commit:

r47858:1d075b85 stable
r48731:a28a7dcb default
Show More
remotefilelog-library.sh
75 lines | 1.1 KiB | application/x-sh | BashLexer
/ tests / remotefilelog-library.sh
CACHEDIR=$PWD/hgcache
cat >> $HGRCPATH <<EOF
[remotefilelog]
cachepath=$CACHEDIR
debug=True
[extensions]
remotefilelog=
rebase=
strip=
[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
[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
[phases]
publish=False
EOF
}
clearcache() {
rm -rf $CACHEDIR/*
}
mkcommit() {
echo "$1" > "$1"
hg add "$1"
hg ci -m "$1"
}
ls_l() {
"$PYTHON" $TESTDIR/ls-l.py "$@"
}
identifyrflcaps() {
xargs -n 1 echo | egrep '(remotefilelog|getflogheads|getfile)' | sort
}