build.xml
changeset 3841 0958b4ae7fe5
parent 3825 236c2b6af349
child 3868 ff43c7c0a97b
--- a/build.xml	Fri May 08 13:36:52 2009 +0200
+++ b/build.xml	Fri May 08 13:50:12 2009 +0200
@@ -103,10 +103,7 @@
   <property name="force" value="false" />
   <property name="local" value="true" />
 
-  <available file=".svn/entries" property="is.svn" />
-
-
-
+  <available file=".hg" property="is.hg" />
 
 
   <condition property="deploy.mode" value="class">
@@ -206,23 +203,16 @@
   </target>
 
   <target name="code.rev" depends="set.code.rev">
-    <condition property="code.revision" value="${svn.entries}" else="0">
-      <isset property="svn.entries" />
+    <condition property="code.revision" value="${hg.id}" else="0">
+      <isset property="hg.id" />
     </condition>
   </target>
 
-  <target name="set.code.rev" if="is.svn">
-    <loadfile property="svn.entries" srcFile=".svn/entries" failonerror="false">
-      <filterchain>
-        <filterreader classname="org.apache.tools.ant.filters.HeadFilter">
-          <param name="skip" value="3" />
-          <param name="lines" value="1" />
-        </filterreader>
-      </filterchain>
-      <filterchain>
-        <filterreader classname="org.apache.tools.ant.filters.StripLineBreaks" />
-      </filterchain>
-    </loadfile>
+  <target name="set.code.rev" if="is.hg">
+    <exec executable="hg" outputproperty="hg.id" failifexecutionfails="false">
+      <arg value="id"/>
+      <arg value="-i"/>
+    </exec>
   </target>
 
   <target name="compile.complete" depends="init">