Mercurial > hg
view tests/remotefilelog-library.sh @ 42712:cdf0e9523de1
branchmap: explicitly warm+write all subsets of the branchmap caches
'full' claims it will warm all of the caches that are known about, but this was
not the case - it did not actually warm the branchmap caches for subsets that we
haven't requested, or for subsets that are still considered "valid". By
explicitly writing them to disk, we can force the subsets for ex: "served" to be
written ("immutable" and "base"), making it cheaper to calculate "served" the
next time it needs to be updated.
Differential Revision: https://phab.mercurial-scm.org/D6710
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Mon, 05 Aug 2019 13:31:12 -0700 |
parents | 17f21047a232 |
children | 0826d684a1b5 |
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 }