##// END OF EJS Templates
verify: reference the correct linkrev when a filelog is missing...
verify: reference the correct linkrev when a filelog is missing when a filelog is missing, the first bad revision is the first revision where the filelog is referenced, not 0.

File last commit:

r8073:e8a28556 default
r8292:29540554 default
Show More
test-repair-strip
36 lines | 851 B | text/plain | TextLexer
#!/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
cat .hg/store/journal | sed 's/\.i[^\n]*/\.i/'
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
echo c > c
hg -q ci -m "c" -A
teststrip 0 1 w .hg/store/data/b.i
teststrip 0 1 r .hg/store/data/b.i
teststrip 0 1 w .hg/store/00changelog.i