don't set code.rev in case it is already set
authorAsier Lostalé <asier.lostale@openbravo.com>
Fri, 21 Nov 2008 08:33:40 +0000
changeset 2056 52856de9b823
parent 2055 20890e6305f7
child 2057 12a14c230fce
don't set code.rev in case it is already set
build.xml
--- a/build.xml	Fri Nov 21 07:17:21 2008 +0000
+++ b/build.xml	Fri Nov 21 08:33:40 2008 +0000
@@ -101,6 +101,10 @@
 	<property name="obx.export.CS" value="false"/>
 	<property name="chekPerms" value="false"/>
 	
+	<condition property="is.code.rev">
+		<isset property="code.revision"/>
+	</condition>
+	
 	<condition property="mode.war">
 	  <equals arg1="war" arg2="${deploy.mode}"/>
 	</condition>
@@ -145,9 +149,6 @@
       <isset property="env.JAVA_HOME"/>
     </not>
   </condition>
-	
-	<available file=".svn/entries" property="is.svn"/>
-			
 
   <path id="project.class.path">
     <pathelement path="${build}"/>
@@ -185,14 +186,7 @@
     <fail if="no.java.home" message="The environment variable JAVA_HOME is not set."/>
   </target>
 
-  <target name="code.rev">
-  	<antcall target="set.code.rev"/>
-  	<condition property="code.revision" value="${svn.entries}" else ="0">
-  	  <isset property="svn.entries" />
-  	</condition>
-  </target>
-
-	<target name="set.code.rev" if="is.svn">
+  <target name="code.rev" unless="is.code.rev">
     <loadfile property="svn.entries" srcFile=".svn/entries" failonerror="false">
       <filterchain>
         <filterreader classname="org.apache.tools.ant.filters.HeadFilter">
@@ -204,8 +198,12 @@
         <filterreader classname="org.apache.tools.ant.filters.StripLineBreaks" />
       </filterchain>
     </loadfile>
-		
-	</target>
+    <condition property="code.revision" value="${svn.entries}" else ="0">
+      <and>
+        <isset property="svn.entries" />
+      </and>
+    </condition>
+  </target>
 
   <target name="compile.complete" depends="init">
     <ant dir="${base.src}" target="compile.complete" inheritAll="true" inheritRefs="true"/>