setup.py: fix version detection for tarball
- don't do version detection if there's no .hg directory
- shrink try: clause
- don't write __version__.py if version is unknown
(we might overwrite the real version)
# this file holds the definitions that are used in various bzr tests
"$TESTDIR/hghave" bzr || exit 80
echo '[extensions]' >> $HGRCPATH
echo 'convert = ' >> $HGRCPATH
echo 'hgext.graphlog = ' >> $HGRCPATH
glog()
{
hg glog --template '#rev# "#desc|firstline#" files: #files#\n' "$@"
}
manifest()
{
echo "% manifest of $2"
hg -R $1 manifest -v -r $2
}