Mercurial > hg
view tests/remotefilelog-library.sh @ 47872:cdad6560e832
wireprotov1peer: simplify the way batchable rpcs are defined
The scheme with futures/generator is confusing due to the way
communication is done by side effects, especially with two different
"future" objects. Just returning a request and a function to read the
response is easier to understand.
There are tests failures with the largefiles extension due to it
aliasing one rpc to another one, which gets fixed in the next commit.
Differential Revision: https://phab.mercurial-scm.org/D11211
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Tue, 24 Aug 2021 17:27:16 +0200 |
parents | 1d075b857c90 |
children | 9c4204b7f3e4 |
line wrap: on
line source
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 }