[GRASS-SVN] r59875 - grass/branches/releasebranch_7_0/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Apr 21 05:01:16 PDT 2014
Author: martinl
Date: 2014-04-21 05:01:16 -0700 (Mon, 21 Apr 2014)
New Revision: 59875
Modified:
grass/branches/releasebranch_7_0/lib/init/grass.py
Log:
grass.py: show also revision number if available
(merge r59847+r59851 from trunk)
Modified: grass/branches/releasebranch_7_0/lib/init/grass.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/init/grass.py 2014-04-21 11:58:28 UTC (rev 59874)
+++ grass/branches/releasebranch_7_0/lib/init/grass.py 2014-04-21 12:01:16 UTC (rev 59875)
@@ -986,8 +986,17 @@
def say_hello():
sys.stderr.write(_("Welcome to GRASS %s") % grass_version)
-
-
+ if grass_version.endswith('svn'):
+ try:
+ filerev = open(os.path.join(gisbase, 'etc', 'VERSIONNUMBER'))
+ linerev = filerev.readline().rstrip('\n')
+ filerev.close()
+
+ revision = linerev.split(' ')[1]
+ sys.stderr.write(' (' + revision + ')')
+ except:
+ pass
+
def show_info():
sys.stderr.write(
r"""
More information about the grass-commit
mailing list