[GRASS-SVN] r45525 - in grass/trunk: general/g.version gui/wxpython/gui_modules lib/python

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Mar 3 02:42:57 EST 2011


Author: hamish
Date: 2011-03-02 23:42:56 -0800 (Wed, 02 Mar 2011)
New Revision: 45525

Modified:
   grass/trunk/general/g.version/main.c
   grass/trunk/gui/wxpython/gui_modules/ghelp.py
   grass/trunk/lib/python/core.py
Log:
more precise name for shell variable names.
strip pretty-text out of shell script output, quote date string.


Modified: grass/trunk/general/g.version/main.c
===================================================================
--- grass/trunk/general/g.version/main.c	2011-03-03 06:40:28 UTC (rev 45524)
+++ grass/trunk/general/g.version/main.c	2011-03-03 07:42:56 UTC (rev 45525)
@@ -7,7 +7,7 @@
 *  	    	Justin Hickey - Thailand - jhickey hpcc.nectec.or.th
 * PURPOSE: 	Output GRASS version number, date and copyright message.
 *             
-* COPYRIGHT:  	(C) 2000-2009, 2011 by the GRASS Development Team
+* COPYRIGHT:  	(C) 2000-2011 by the GRASS Development Team
 *
 *   	    	This program is free software under the GPL (>=v2)
 *   	    	Read the file COPYING that comes with GRASS for details.
@@ -91,11 +91,11 @@
 	char **rev_ver = G_tokenize(GIS_H_VERSION, "$");
 	char **rev_time = G_tokenize(GIS_H_DATE, "$");
 	if (shell->answer) {
-	    fprintf(stdout, "gis_revision=%s\n", rev_ver[1]);
-	    fprintf(stdout, "gis_date=%s\n", rev_time[1]);
+	    fprintf(stdout, "libgis_revision=%s\n", strstr(rev_ver[1], " ") + 1);
+	    fprintf(stdout, "libgis_date=\"%s\"\n", strstr(rev_time[1], " ") + 1);
 	}
 	else {
-	    fprintf(stdout, "%s\n%s\n", rev_ver[1], rev_time[1]);
+	    fprintf(stdout, "libgis %s\nlibgis %s\n", rev_ver[1], rev_time[1]);
 	}
 	G_free_tokens(rev_ver);
 	G_free_tokens(rev_time);

Modified: grass/trunk/gui/wxpython/gui_modules/ghelp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/ghelp.py	2011-03-03 06:40:28 UTC (rev 45524)
+++ grass/trunk/gui/wxpython/gui_modules/ghelp.py	2011-03-03 07:42:56 UTC (rev 45525)
@@ -527,8 +527,8 @@
                           flag = wx.ALIGN_RIGHT)
         
         infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
-                                               label = svn_gis_h_rev.split(' ')[1] + ' (' +
-                                               svn_gis_h_date.split(' ')[1] + ')'),
+                                               label = svn_gis_h_rev.split(' ')[2] + ' (' +
+                                               svn_gis_h_date.split(' ')[2] + ')'),
                           pos = (2, 1),
                           flag = wx.ALIGN_LEFT)
 

Modified: grass/trunk/lib/python/core.py
===================================================================
--- grass/trunk/lib/python/core.py	2011-03-03 06:40:28 UTC (rev 45524)
+++ grass/trunk/lib/python/core.py	2011-03-03 07:42:56 UTC (rev 45525)
@@ -1074,8 +1074,8 @@
     @code
     version()
 
-    {'date': '2011', 'gis_revision': 'Revision: 45093 ', 'version': '7.0.svn',
-     'gis_date': 'Date: 2011-01-20 13:10:50 +0100 (Thu, 20 Jan 2011) ', 'revision': '45136M'}
+    {'date': '2011', 'libgis_revision': '45093 ', 'version': '7.0.svn',
+     'libgis_date': '2011-01-20 13:10:50 +0100 (Thu, 20 Jan 2011) ', 'revision': '45136M'}
     @endcode
     """
     return parse_command('g.version',



More information about the grass-commit mailing list