Mercurial > hg
view tests/remotefilelog-library.sh @ 49788:31b4675ca998 stable
emitrevision: if we need to compute a delta on the fly, try p1 or p2 first
Falling back to `prev` does not yield any real value on modern storage and
result in pathological changes to be created on the other side. Doing a delta
against a parent will likely be smaller (helping the network) and will be safer
to apply on the client (helping future pulls by Triggering intermediate
snapshop where they will be needed by later deltas).
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 24 Nov 2022 04:04:19 +0100 |
parents | 0c92cd9286ee |
children | 7e5be4a7cda7 |
line wrap: on
line source
CACHEDIR=$PWD/hgcache cat >> $HGRCPATH <<EOF [remotefilelog] cachepath=$CACHEDIR debug=True [extensions] remotefilelog= rebase= strip= [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 }