Author: sebb
Date: Sat May 31 10:08:13 2008
New Revision: 662048
URL: http://svn.apache.org/viewvc?rev=662048&view=rev
Log:
svnAnt does not work on directories, so parse svn info output instead
Modified:
jakarta/jmeter/trunk/build.xml
Modified: jakarta/jmeter/trunk/build.xml
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/build.xml?rev=662048&r1=662047&r2=662048&view=diff
==============================================================================
--- jakarta/jmeter/trunk/build.xml (original)
+++ jakarta/jmeter/trunk/build.xml Sat May 31 10:08:13 2008
@@ -1816,20 +1816,21 @@
</junitreport>
</target>
- <path id="svnant.classpath">
- <pathelement location="${lib.opt}/svnant.jar"/>
- <pathelement location="${lib.opt}/svnClientAdapter.jar"/>
- <pathelement location="${lib.opt}/svnjavahl.jar"/>
- </path>
-
- <available resource="svntask.properties"
classpathref="svnant.classpath" property="svnAnt.present"/>
-
- <target name="svnCheck" description="Use SVN to get the current revision"
if="svnAnt.present">
- <!-- The task def is nested here so that a missing jar does not cause an
error -->
- <taskdef resource="svntask.properties"
classpathref="svnant.classpath"/>
- <svn>
- <status path="build.xml"
- revisionProperty="svn.revision"/>
- </svn>
- </target>
-</project>
\ No newline at end of file
+ <target name="svnCheck" description="Use SVN to get the current revision">
+ <exec executable="svn" resultproperty="svn.exec.result"
errorproperty="svn.exec.error" failifexecutionfails="false">
+ <arg line="info"/>
+ <redirector outputproperty="svn.revision">
+ <outputfilterchain>
+ <linecontains>
+ <contains value="Last Changed Rev: "/>
+ </linecontains>
+ <tokenfilter>
+ <!-- Remove all but the revision number -->
+ <replaceregex pattern=".*: " replace=""/>
+ </tokenfilter>
+ </outputfilterchain>
+ </redirector>
+ </exec>
+ <echoproperties prefix="svn"/>
+ </target>
+</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]