##// END OF EJS Templates
tests: make test-subrepo-git.t compatible with git's master->main rename...
tests: make test-subrepo-git.t compatible with git's master->main rename Git is about to change the default branch from "master" to "main". Recent versions has started warning about that, which makes tests fail. I assume the tests would fail in a different way once the default has changed. To make us compatible with that name change, let's set configure the default to be "master". That value makes the tests still work on older Git version (those where the default branch name is not configurable). Differential Revision: https://phab.mercurial-scm.org/D9746

File last commit:

r37204:03ff17a4 default
r46842:88dfe1c2 default
Show More
library-infinitepush.sh
49 lines | 850 B | application/x-sh | BashLexer
/ tests / library-infinitepush.sh
Pulkit Goyal
infinitepush: move the extension to core from fb-hgext...
r37204 scratchnodes() {
for node in `find ../repo/.hg/scratchbranches/index/nodemap/* | sort`; do
echo ${node##*/} `cat $node`
done
}
scratchbookmarks() {
for bookmark in `find ../repo/.hg/scratchbranches/index/bookmarkmap/* -type f | sort`; do
echo "${bookmark##*/bookmarkmap/} `cat $bookmark`"
done
}
setupcommon() {
cat >> $HGRCPATH << EOF
[extensions]
infinitepush=
[ui]
ssh = python "$TESTDIR/dummyssh"
[infinitepush]
branchpattern=re:scratch/.*
EOF
}
setupserver() {
cat >> .hg/hgrc << EOF
[infinitepush]
server=yes
indextype=disk
storetype=disk
reponame=babar
EOF
}
waitbgbackup() {
sleep 1
hg debugwaitbackup
}
mkcommitautobackup() {
echo $1 > $1
hg add $1
hg ci -m $1 --config infinitepushbackup.autobackup=True
}
setuplogdir() {
mkdir $TESTTMP/logs
chmod 0755 $TESTTMP/logs
chmod +t $TESTTMP/logs
}