mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
8674a90bb5
Summary: This patch just bumps the histpack version number to 1 and adds a config flag to enable writing v1 pack files. The format hasn't actually changed in this patch, I'm just doing the verison bump so I can update all the hashes in the tests without working about functionality change. In the next patch I will modify the index format, which won't affect the hashes. Test Plan: Ran the tests. I also ran the tests with some debug code to manually force the sha to include 0 instead of 1 and verified that the hash didn't change (which confirms that all of these hash changes are just because of that one byte version change). Reviewers: #mercurial, quark Reviewed By: quark Subscribers: mjpieters Differential Revision: https://phabricator.intern.facebook.com/D4983675 Signature: t1:4983675:1493692444:5d88df4d46ce487f1b791417754ba000ecf10a1e
56 lines
758 B
Bash
56 lines
758 B
Bash
${PYTHON:-python} -c 'import lz4' || exit 80
|
|
|
|
CACHEDIR=$PWD/hgcache
|
|
cat >> $HGRCPATH <<EOF
|
|
[remotefilelog]
|
|
cachepath=$CACHEDIR
|
|
debug=True
|
|
historypackv1=True
|
|
[extensions]
|
|
remotefilelog=
|
|
rebase=
|
|
mq=
|
|
[ui]
|
|
ssh=python "$TESTDIR/dummyssh"
|
|
[server]
|
|
preferuncompressed=True
|
|
[experimental]
|
|
changegroup3=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
|
|
datapackversion=1
|
|
EOF
|
|
}
|
|
|
|
hginit() {
|
|
local name
|
|
name=$1
|
|
shift
|
|
hg init $name $@
|
|
}
|
|
|
|
clearcache() {
|
|
rm -rf $CACHEDIR/*
|
|
}
|
|
|
|
mkcommit() {
|
|
echo "$1" > "$1"
|
|
hg add "$1"
|
|
hg ci -m "$1"
|
|
}
|
|
|
|
ls_l() {
|
|
$PYTHON $TESTDIR/ls-l.py "$@"
|
|
}
|