[GRASS-dev] Re: [GRASS GIS] #587: svn versions should better
reflect svn rev
GRASS GIS
trac at osgeo.org
Thu May 14 06:47:28 EDT 2009
#587: svn versions should better reflect svn rev
--------------------------+-------------------------------------------------
Reporter: hamish | Owner: martinl
Type: enhancement | Status: reopened
Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: g.version
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by hamish):
I have now applied the new g.version -r flag in trunk (r37158) and devbr6
(r37233).
Ideas of where to go from here:
- in the wxGUI Help->About instead of just a misleading $Rev$, change the
version number to be:
{{{
wxPython GUI: $Rev$
libgrass: $Rev$ (pull from `g.version -r`)
}}}
- some autoincrement a number in a file without triggering a rev script
as a checkin-hook could maintain a global branch rev number & date for
versioning use, but it would need to be done on the server and might be a
PITA.
- we can use the 'svn info' command line tool to grab global-project rev
(if svn is installed on the local system), as well as the branch's global
rev (if svn is installed).
- proposal: grep the top .svn/ dir manually so it doesn't matter if `svn`
is installed or not:
{{{
REV=""
if [ -d .svn ] ; then
REV=`head -n 11 .svn/entries | tail -n 1`
REV_DATE=`head -n 10 .svn/entries | tail -n 1`
fi
# would happen in build scripts, but e.g.
FULL_VERSION="$GRASS_VERSION$REV"
}}}
line 11 of .svn/entries is the rev number of the last change in that
branch. line 10 is the timestamp of that commit.
That would only happen if include/VERSION has "svn" in it.
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/587#comment:20>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list