verify: fix "missing revlog!" errors for revlog format v0 and add test
With revlog format v0 the .d files are empty if the only revision stored is an
empty file. Since Mercurial can no longer create format v0 repositories, but
still use it, add a script which creates a repository with a single empty file.
This can be used in other tests if wanted.
#!/bin/sh
echo "[extensions]" >> $HGRCPATH
echo "mq=" >> $HGRCPATH
hg init a
cd a
echo a > a
hg ci -Ama
hg qnew a.patch
echo a >> a
hg qrefresh
hg qnew b.patch
echo b > b
hg add b
hg qrefresh
hg qnew c.patch
echo c > c
hg add c
hg qrefresh
hg qgoto a.patch
hg qgoto c.patch
hg qgoto b.patch
echo
echo % Using index
hg qgoto 0
hg qgoto 2
echo
echo % No warnings when using index
hg qnew bug314159
echo d >> c
hg qrefresh
hg qnew bug141421
echo e >> c
hg qrefresh
hg qgoto 1
hg qgoto 3
echo
echo % Detect ambiguous non-index
hg qgoto 14
exit 0