[configure] Use hg, instead of svn, to compute the version string 1.4
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Aug 03 22:47:53 2009 +0200 (2009-08-03)
branch1.4
changeset 14500505b0d5cd63
parent 1344 621dcbf2bf83
child 1451 25d050084e98
[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.
.version
configure
     1.1 --- a/.version	Tue May 19 16:13:34 2009 +0000
     1.2 +++ b/.version	Mon Aug 03 22:47:53 2009 +0200
     1.3 @@ -1,1 +1,1 @@
     1.4 -1.4.1+svn
     1.5 +1.4.1+hg
     2.1 --- a/configure	Tue May 19 16:13:34 2009 +0000
     2.2 +++ b/configure	Mon Aug 03 22:47:53 2009 +0200
     2.3 @@ -340,21 +340,13 @@
     2.4  # If we can't get the revision number, use date
     2.5  printf "Computing version string... "
     2.6  case "${VERSION}" in
     2.7 -    *+svn|svn)
     2.8 -        REVISION="$( LC_ALL=C svnversion )"
     2.9 +    *+hg|hg)
    2.10 +        REVISION="$( hg id -n 2>/dev/null )"
    2.11          case "${REVISION}" in
    2.12 -            exported)
    2.13 +            "")
    2.14                  VERSION="${VERSION}_unknown@$( date +%Y%m%d.%H%M%S )";;
    2.15              *)
    2.16 -                URL="$( LC_ALL=C svn info 2>/dev/null   \
    2.17 -                                 |egrep 'URL: '         \
    2.18 -                                 |cut -d ' ' -f 2-      \
    2.19 -                      )"
    2.20 -                ROOT="$( LC_ALL=C svn info 2>/dev/null      \
    2.21 -                         |"${grep}" '^Repository Root: '    \
    2.22 -                         |cut -d ' ' -f 3-                  \
    2.23 -                       )"
    2.24 -                VERSION="${VERSION}${URL#${ROOT}}@${REVISION}"
    2.25 +                VERSION="${VERSION}_$( hg id -b )@${REVISION%%+}_$( hg id -i )"
    2.26                  ;;
    2.27          esac
    2.28          # Arrange to have no / in the directory name, no need to create an