harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r650060 - in /harmony/enhanced: common_resources/trunk/make/properties.xml common_resources/trunk/make/svn.xml drlvm/trunk/make/properties.xml trunk/build.xml
Date Mon, 21 Apr 2008 09:23:58 GMT
Author: varlax
Date: Mon Apr 21 02:23:48 2008
New Revision: 650060

URL: http://svn.apache.org/viewvc?rev=650060&view=rev
Log:
Fixed HARMONY-5256 [build] Federated build in localized environment may fail if subversion
is localized
Consistently set the same properties in common_resources/make/properties.xml for non-federated
builds

Modified:
    harmony/enhanced/common_resources/trunk/make/properties.xml
    harmony/enhanced/common_resources/trunk/make/svn.xml
    harmony/enhanced/drlvm/trunk/make/properties.xml
    harmony/enhanced/trunk/build.xml

Modified: harmony/enhanced/common_resources/trunk/make/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/common_resources/trunk/make/properties.xml?rev=650060&r1=650059&r2=650060&view=diff
==============================================================================
--- harmony/enhanced/common_resources/trunk/make/properties.xml (original)
+++ harmony/enhanced/common_resources/trunk/make/properties.xml Mon Apr 21 02:23:48 2008
@@ -28,6 +28,9 @@
     <dirname property="common.basedir"
              file="${ant.file.Common property definitions}/.."/>
 
+    <import file="${common.basedir}/make/svn.xml"/>
+
+
     <!-- Root directory of the common dependemcy pool -->
     <property name="base.dep.dir" location="${common.basedir}/depends"/>
 
@@ -343,7 +346,7 @@
         </not>
      </condition>
 
-    <target name="echo" depends="svn-prop, svn-info, test-jre-vm-info"
+    <target name="echo" depends="svn-info, test-jre-vm-info"
             description="Display the properties defined by this ant file" >
         <echo>
 Harmony release configuration property:
@@ -418,49 +421,6 @@
   os.arch = ${os.arch}
 
         </echo>
-    </target>
-
-    <target name="svn-prop">
-        <exec executable="svn">
-            <arg value="--non-interactive" />
-            <arg value="info" />
-            <redirector outputproperty="svn.revision">
-                <outputfilterchain>
-                    <linecontains>
-                        <contains value="Revision: " />
-                    </linecontains>
-                    <tokenfilter>
-                        <replacestring from="Revision: " to=""/>
-                    </tokenfilter>
-                </outputfilterchain>
-            </redirector>
-        </exec>
-    </target>
-
-    <target name="svn-info">
-        <exec executable="svn"
-              failifexecutionfails="false"
-              resultproperty="svn.rc">
-            <arg value="info" />
-            <redirector outputproperty="svn.info.tmp">
-                <outputfilterchain>
-                    <linecontainsregexp>
-                        <regexp pattern="Repository Root:|Revision:" />
-                    </linecontainsregexp>
-                    <tokenfilter>
-                        <replacestring from="Repository Root: " to=""/>
-                        <replacestring from="Revision: " to=" "/>
-                    </tokenfilter>
-                    <striplinebreaks/>
-                </outputfilterchain>
-            </redirector>
-        </exec>
-        <condition property="svn.info" value="${svn.info.tmp}" >
-            <equals arg1="${svn.rc}" arg2="0" />
-        </condition>
-        <tstamp>
-            <format property="svn.info" pattern="'Unknown revision at' dd-MMM-yyyy hh:mm
aa"/>
-        </tstamp>
     </target>
 
     <target name="test-jre-vm-info" depends="-get-test-vm-output">

Modified: harmony/enhanced/common_resources/trunk/make/svn.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/common_resources/trunk/make/svn.xml?rev=650060&r1=650059&r2=650060&view=diff
==============================================================================
--- harmony/enhanced/common_resources/trunk/make/svn.xml (original)
+++ harmony/enhanced/common_resources/trunk/make/svn.xml Mon Apr 21 02:23:48 2008
@@ -21,9 +21,24 @@
 
 <project name="svn-deps">
     
-    <!--dirname property="svn.basedir" file="${ant.file.svn-deps}"/>
-    <import file="${svn.basedir}/properties.xml"/>    
-    <property file="${svn.basedir}/depends.properties"/-->
+    <target name="svn-info" 
+        description="Sets global SVN properties of the workspace: 
+        is.svn, svn.revision and svn.info">
+        <svn-info dir="${basedir}" prefix="global"/>
+        <condition property="is.svn">
+            <isset property="global.svn.revision"/>
+        </condition>
+        <condition property="svn.revision" value="${global.svn.revision}" else="unknown">
+            <isset property="is.svn"/>
+        </condition>
+        <condition property="svn.info" 
+            value="${global.svn.repository.root} ${global.svn.revision}">
+            <isset property="is.svn"/>
+        </condition>
+        <tstamp>
+            <format property="svn.info" pattern="'Unknown revision at' dd-MMM-yyyy hh:mm
aa"/>
+        </tstamp>
+    </target>
     
     <target name="fetch-svn">
         <setup-svn dep="${dependency}"/>

Modified: harmony/enhanced/drlvm/trunk/make/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/make/properties.xml?rev=650060&r1=650059&r2=650060&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/make/properties.xml (original)
+++ harmony/enhanced/drlvm/trunk/make/properties.xml Mon Apr 21 02:23:48 2008
@@ -99,7 +99,7 @@
     </condition>
     <property name="base.test.dir" location="${drlvm.build.dir}/tests"/>
     
-    <target name="drlvm-echo" depends="svn-prop">
+    <target name="drlvm-echo" depends="svn-info">
         <echo message="DRLVM build Configuration:" />
         <echo message="     Hosting Java = ${java.version} (${java.vendor})" />
         <echo message="               os = ${hy.os}" />

Modified: harmony/enhanced/trunk/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/build.xml?rev=650060&r1=650059&r2=650060&view=diff
==============================================================================
--- harmony/enhanced/trunk/build.xml (original)
+++ harmony/enhanced/trunk/build.xml Mon Apr 21 02:23:48 2008
@@ -735,79 +735,43 @@
 
     <!-- ============================================================== -->
     <!-- svn-prop: gets svn revision number of the build.xml file       -->
-    <!--                                                                -->
-    <!-- taken from classlib/properties.xml, because of uncertainty     -->
-    <!-- of the state of the working_classlib dir, I need a copy        -->
-    <!-- TODO - we want to be able to pass property in to ant           -->
-    <!--        so we don't need a pause and it's reproducable          -->
     <!-- ============================================================== -->
     <target name="svn-prop">
-        <exec executable="svn"
-              dir="."
-              failifexecutionfails="false"
-              resultproperty="svn.rc">
-            <arg value="info" />
-            <arg value="build.xml" />
-            <redirector outputproperty="svn.revision.tmp">
-                <outputfilterchain>
-                    <linecontains>
-                        <contains value="Revision: " />
-                    </linecontains>
-                    <tokenfilter>
-                        <replacestring from="Revision: " to=""/>
-                    </tokenfilter>
-                </outputfilterchain>
-            </redirector>
+        
+        <tempfile suffix=".xml" property="svn.tmp"/>
+        <exec executable="svn" output="${svn.tmp}" resultproperty="svn.rc">
+            <arg line="info ${basedir} --non-interactive --xml" />
         </exec>
-        <condition property="is.svn" value="true">
-            <equals arg1="${svn.rc}" arg2="0" />
+        <condition property="svn.info.file" value="${svn.tmp}">
+            <equals arg1="0" arg2="${svn.rc}"/>
         </condition>
-        <condition property="svn.revision" value="${svn.revision.tmp}" >
-            <equals arg1="${svn.rc}" arg2="0" />
+        <xmlproperty file="${svn.info.file}" prefix="federated" 
+            keeproot="no" collapseAttributes="yes"/>
+        <delete file="${svn.tmp}" quiet="true"/>
+
+        <condition property="is.svn">
+            <isset property="federated.svn.revision"/>
         </condition>
-        <property name="svn.revision" value="unknown" />
-        <property name="harmony.version" value="${svn.revision}" />
+        <condition property="svn.revision" value="${federated.svn.revision}" else="unknown">
+            <isset property="is.svn"/>
+        </condition>
+            <condition property="svn.root" 
+                value="${federated.svn.repository.root}"
+                else="http://svn.apache.org/repos/asf">
+                <isset property="is.svn"/>
+            </condition>
 
-        <exec executable="svn"
-              failifexecutionfails="false"
-              resultproperty="svn.rc">
-            <arg value="info" />
-            <redirector outputproperty="svn.root.tmp">
-                <outputfilterchain>
-                    <linecontainsregexp>
-                        <regexp pattern="Repository Root:" />
-                    </linecontainsregexp>
-                    <tokenfilter>
-                        <replacestring from="Repository Root: " to=""/>
-                    </tokenfilter>
-                    <striplinebreaks/>
-                </outputfilterchain>
-            </redirector>
-        </exec>
-        <condition property="svn.info" value="${svn.root.tmp} ${svn.revision}" >
-            <equals arg1="${svn.rc}" arg2="0" />
+        <condition property="svn.info" value="${svn.root} ${svn.revision}">
+            <isset property="is.svn"/>
         </condition>
         <tstamp>
-            <format property="svn.info"
-                    pattern="'Unknown revision at' dd-MMM-yyyy hh:mm aa"/>
+            <format property="svn.info" pattern="'Unknown revision at' dd-MMM-yyyy hh:mm
aa"/>
         </tstamp>
-        <property name="harmony.long.version" value="${svn.info}" />
 
-        <condition property="svn.root" value="${svn.root.tmp}" >
-            <and>
-                <equals arg1="${svn.rc}" arg2="0" />
-                <!-- check length: it is an empty string             --> 
-                <!-- if svn output doesn't contain "Repository Root" -->
-                <length string="${svn.root.tmp}"
-                        trim="true"
-                        when="greater"
-                        length="0" />
-            </and>
-        </condition>
+        <property name="harmony.version" value="${svn.revision}" />
+        <property name="harmony.long.version" value="${svn.info}" />
 
         <!-- default SVN URLs -->
-        <property name="svn.root" value="http://svn.apache.org/repos/asf"/>
-
         <condition property="classlib.svn.url"
                    value="${svn.root}/harmony/enhanced/classlib/branches/java6"
                    else="${svn.root}/harmony/enhanced/classlib/trunk">



Mime
View raw message