Reviewers: felix8a,

Description:
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.

Please review this at https://codereview.appspot.com/22210043/

Affected files (+9, -4 lines):
  M     build.xml
  M     tools/svnversion-nocolon


Index: build.xml
===================================================================
--- build.xml   (revision 5623)
+++ build.xml   (working copy)
@@ -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>
Index: tools/svnversion-nocolon
===================================================================
--- tools/svnversion-nocolon    (revision 5623)
+++ tools/svnversion-nocolon    (working copy)
@@ -1,5 +1,10 @@
 #!/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 |
+    sed -E -e 's/^(Unversioned.*|Uncommitted.*|exported)$/unknown/' \
+           -e 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