[configure] Use hg, instead of svn, to compute the version string

Now we moved from Subversion to Mercurial, use the hg command to
compute the version string.

Manually backported from 1409:7264ce426be4 plus 1430:933eee133cbf
as too much changes have been made to ./configure in the meantime.
This commit is contained in:
Yann E. MORIN" 2009-08-03 22:47:53 +02:00
parent 6841b1f9ec
commit e76e47b650
2 changed files with 5 additions and 13 deletions

View File

@ -1 +1 @@
1.4.1+svn
1.4.1+hg

16
configure vendored
View File

@ -340,21 +340,13 @@ IFS="${save_IFS}"
# If we can't get the revision number, use date
printf "Computing version string... "
case "${VERSION}" in
*+svn|svn)
REVISION="$( LC_ALL=C svnversion )"
*+hg|hg)
REVISION="$( hg id -n 2>/dev/null )"
case "${REVISION}" in
exported)
"")
VERSION="${VERSION}_unknown@$( date +%Y%m%d.%H%M%S )";;
*)
URL="$( LC_ALL=C svn info 2>/dev/null \
|egrep 'URL: ' \
|cut -d ' ' -f 2- \
)"
ROOT="$( LC_ALL=C svn info 2>/dev/null \
|"${grep}" '^Repository Root: ' \
|cut -d ' ' -f 3- \
)"
VERSION="${VERSION}${URL#${ROOT}}@${REVISION}"
VERSION="${VERSION}_$( hg id -b )@${REVISION%%+}_$( hg id -i )"
;;
esac
# Arrange to have no / in the directory name, no need to create an