| 1 |
CACHEDIR=$PWD/hgcache |
| 2 |
cat >> $HGRCPATH <<EOF |
| 3 |
[remotefilelog] |
| 4 |
cachepath=$CACHEDIR |
| 5 |
debug=True |
| 6 |
[extensions] |
| 7 |
remotefilelog= |
| 8 |
rebase= |
| 9 |
strip= |
| 10 |
[server] |
| 11 |
preferuncompressed=True |
| 12 |
[rebase] |
| 13 |
singletransaction=True |
| 14 |
EOF |
| 15 |
|
| 16 |
hgcloneshallow() { |
| 17 |
local name |
| 18 |
local dest |
| 19 |
orig=$1 |
| 20 |
shift |
| 21 |
dest=$1 |
| 22 |
shift |
| 23 |
hg clone --shallow --config remotefilelog.reponame=master $orig $dest $@ |
| 24 |
cat >> $dest/.hg/hgrc <<EOF |
| 25 |
[remotefilelog] |
| 26 |
reponame=master |
| 27 |
[phases] |
| 28 |
publish=False |
| 29 |
EOF |
| 30 |
} |
| 31 |
|
| 32 |
hgcloneshallowlfs() { |
| 33 |
local name |
| 34 |
local dest |
| 35 |
local lfsdir |
| 36 |
orig=$1 |
| 37 |
shift |
| 38 |
dest=$1 |
| 39 |
shift |
| 40 |
lfsdir=$1 |
| 41 |
shift |
| 42 |
hg clone --shallow --config "extensions.lfs=" --config "lfs.url=$lfsdir" --config remotefilelog.reponame=master $orig $dest $@ |
| 43 |
cat >> $dest/.hg/hgrc <<EOF |
| 44 |
[extensions] |
| 45 |
lfs= |
| 46 |
[lfs] |
| 47 |
url=$lfsdir |
| 48 |
[remotefilelog] |
| 49 |
reponame=master |
| 50 |
[phases] |
| 51 |
publish=False |
| 52 |
EOF |
| 53 |
} |
| 54 |
|
| 55 |
clearcache() { |
| 56 |
rm -rf $CACHEDIR/* |
| 57 |
} |
| 58 |
|
| 59 |
mkcommit() { |
| 60 |
echo "$1" > "$1" |
| 61 |
hg add "$1" |
| 62 |
hg ci -m "$1" |
| 63 |
} |
| 64 |
|
| 65 |
ls_l() { |
| 66 |
"$PYTHON" $TESTDIR/ls-l.py "$@" |
| 67 |
} |
| 68 |
|
| 69 |
identifyrflcaps() { |
| 70 |
xargs -n 1 echo | grep -E '(remotefilelog|getflogheads|getfile)' | sort |
| 71 |
} |