Revision: 5624
Author:   [email protected]
Date:     Tue Nov  5 23:53:19 2013 UTC
Log:      Adjust svnversion glue for unversioned trees in svn 1.7.
https://codereview.appspot.com/22210043

Subversion 1.7 changed svnversion to produce "Unversioned directory"
or other messages instead of "exported"; update our svnversion usage
to canonicalize all 1.7 and pre-1.7 results to "unknown" for use as
our version number.

[email protected]

http://code.google.com/p/google-caja/source/detail?r=5624

Modified:
 /trunk/build.xml
 /trunk/tools/svnversion-nocolon

=======================================
--- /trunk/build.xml    Thu Oct 24 19:11:23 2013 UTC
+++ /trunk/build.xml    Tue Nov  5 23:53:19 2013 UTC
@@ -1275,7 +1275,7 @@
     </copy>
     <replaceregexp
         flags="g"
- match="(cajaBuildVersion\s*=|'cajolerVersion':)\s*'([\dmsp_]+| exported)'" + match="(cajaBuildVersion\s*=|'cajolerVersion':)\s*'([\dmsp_]+| unknown)'"
         replace="\1'0000'">
       <fileset dir="${war}/testing/skew-0000" includes="**/*.js"/>
     </replaceregexp>
@@ -1289,7 +1289,7 @@
     </copy>
     <replaceregexp
         flags="g"
- match="(cajaBuildVersion\s*=|'cajolerVersion':)\s*'([\dmsp_]+| exported)'" + match="(cajaBuildVersion\s*=|'cajolerVersion':)\s*'([\dmsp_]+| unknown)'"
         replace="\1'${ver.mmm}'">
       <fileset dir="${war}/testing/skew-mmm" includes="**/*.js"/>
     </replaceregexp>
=======================================
--- /trunk/tools/svnversion-nocolon     Thu Dec 15 20:55:50 2011 UTC
+++ /trunk/tools/svnversion-nocolon     Tue Nov  5 23:53:19 2013 UTC
@@ -1,5 +1,11 @@
 #!/usr/bin/env bash

 # A wrapper around 'svnversion' that removes the colons
-# and lowercases (appengine restrictions)
-svnversion | sed s/:/_/g | tr 'A-Z' 'a-z'
+# and lowercases (appengine restrictions) and canonicalizes
+# svn 1.7 "Unversioned directory" = svn 1.6 "exported"
+# to "unknown".
+svnversion | perl -pe '
+  s/^(Unversioned.*|Uncommitted.*|exported)$/unknown/;
+  s/:/_/g;
+  tr/A-Z/a-z/;
+'

--

--- You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to