util: stop overwriting sha1, overwrite _fastsha1 instead
Some modules (like revlog) would import util.sha1 as _sha1. This
defeats the purpose of having util.sha1 overwrite itself with a faster
version -- revlog would end up always calling the slow version. By
always delegating to util._fastsha1 we avoid this at the cost of an
extra (but unconditional) indirection.
#!/bin/sh
echo "% init repo1"
hg init repo1
cd repo1
echo
echo "% add a; ci"
echo "some text" > a
hg add
hg ci -m first
echo
echo "% cat .hg/store/fncache"
cat .hg/store/fncache
echo
echo "% add a.i/b; ci"
mkdir a.i
echo "some other text" > a.i/b
hg add
hg ci -m second
echo
echo "% cat .hg/store/fncache"
cat .hg/store/fncache
echo
echo "% add a.i.hg/c; ci"
mkdir a.i.hg
echo "yet another text" > a.i.hg/c
hg add
hg ci -m third
echo
echo "% cat .hg/store/fncache"
cat .hg/store/fncache
echo
echo "% hg verify"
hg verify
echo
echo "% rm .hg/store/fncache"
rm .hg/store/fncache
echo
echo "% hg verify"
hg verify
exit 0