r20140 - gnucash/trunk/util - Use last changed revision number instead of last-commited-somewhere-in-repo

Geert Janssens gjanssens at code.gnucash.org
Fri Jan 21 17:10:40 EST 2011


Author: gjanssens
Date: 2011-01-21 17:10:40 -0500 (Fri, 21 Jan 2011)
New Revision: 20140
Trac: http://svn.gnucash.org/trac/changeset/20140

Modified:
   gnucash/trunk/util/gnc-svnversion
Log:
Use last changed revision number instead of last-commited-somewhere-in-repo

svnversion without options returns the most recent revision in the repo
at the time of the last svn update/checkout even if that revision
didn't hold any changes in the current path. Not very useful as a
reference. Better is to ask for the last changed revision with -c.
BUT: -c option for some reason always considers svn working copy
as having mixed sources. We're only interested in the last part so
we strip the beginning revision if it's there.
As a result if your WC really has mixed sources, that will not be
visible in the version number...

Modified: gnucash/trunk/util/gnc-svnversion
===================================================================
--- gnucash/trunk/util/gnc-svnversion	2011-01-21 19:54:47 UTC (rev 20139)
+++ gnucash/trunk/util/gnc-svnversion	2011-01-21 22:10:40 UTC (rev 20140)
@@ -47,7 +47,17 @@
 #   If this is an svn checkout we assume you have svnversion!
 if test -d "${real_srcdir}"/.svn
 then
-  svnversion "$real_srcdir"
+  # svnversion without options returns the most recent revision in the repo
+  # at the time of the last svn update/checkout even if that revision
+  # didn't hold any changes in the current path. Not very useful as a
+  # reference. Better is to ask for the last changed revision with -c.
+  # BUT: -c option for some reason always considers svn working copy
+  # as having mixed sources. We're only interested in the last part so
+  # we strip the beginning revision if it's there.
+  # As a result if your WC really has mixed sources, that will not be
+  # visible in the version number...
+  svn_mixed_version=$(svnversion -c "$real_srcdir")
+  echo ${svn_mixed_version#*:}
   exit $?
 fi
 


Property changes on: gnucash/trunk/util/gnc-svnversion
___________________________________________________________________
Deleted: svn:executable
   - *



More information about the gnucash-changes mailing list