##// END OF EJS Templates
subrepo: change default path in hgrc of subrepo after cloning...
subrepo: change default path in hgrc of subrepo after cloning Previous behavior was to put in the cloned subrepos the path found in the original main repo. However it isn't valid for relative path and it seems more logical to reference instead the subrepos working copy path of the original main repo.

File last commit:

r9284:4a1b24db default
r10378:e1401c74 default
Show More
test-repair-strip
44 lines | 969 B | text/plain | TextLexer
/ tests / test-repair-strip
Henrik Stuart
strip: make repair.strip transactional to avoid repository corruption...
r8073 #!/bin/sh
echo "[extensions]" >> $HGRCPATH
echo "mq=">> $HGRCPATH
teststrip() {
hg -q up -C $1
echo % before update $1, strip $2
hg parents
chmod -$3 $4
hg strip $2 2>&1 | sed 's/\(saving bundle to \).*/\1/' | sed 's/Permission denied.*\.hg\/store\/\(.*\)/Permission denied \.hg\/store\/\1/'
echo % after update $1, strip $2
chmod +$3 $4
hg verify
echo % journal contents
Mads Kiilerich
test-repair-strip: Don't rely on cat error message
r9284 if [ -f .hg/store/journal ]; then
sed -e 's/\.i[^\n]*/\.i/' .hg/store/journal
else
echo "(no journal)"
fi
Henrik Stuart
strip: make repair.strip transactional to avoid repository corruption...
r8073 ls .hg/store/journal >/dev/null 2>&1 && hg recover
ls .hg/strip-backup/* >/dev/null 2>&1 && hg unbundle -q .hg/strip-backup/*
rm -rf .hg/strip-backup
}
hg init test
cd test
echo a > a
hg -q ci -m "a" -A
echo b > b
hg -q ci -m "b" -A
Henrik Stuart
test: change repair strip test to illustrate manifest errors
r8293 echo b2 >> b
hg -q ci -m "b2" -A
Henrik Stuart
strip: make repair.strip transactional to avoid repository corruption...
r8073 echo c > c
hg -q ci -m "c" -A
Henrik Stuart
test: change repair strip test to illustrate manifest errors
r8293
teststrip 0 2 w .hg/store/data/b.i
teststrip 0 2 r .hg/store/data/b.i
teststrip 0 2 w .hg/store/00manifest.i
Henrik Stuart
strip: make repair.strip transactional to avoid repository corruption...
r8073