Author: sebb
Date: Sat Aug 13 18:19:41 2011
New Revision: 1157406
URL: http://svn.apache.org/viewvc?rev=1157406&view=rev
Log:
Fix error handling if svn is not present or directory is not a working copy
Modified:
jakarta/jmeter/trunk/build.xml
Modified: jakarta/jmeter/trunk/build.xml
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/build.xml?rev=1157406&r1=1157405&r2=1157406&view=diff
==============================================================================
--- jakarta/jmeter/trunk/build.xml (original)
+++ jakarta/jmeter/trunk/build.xml Sat Aug 13 18:19:41 2011
@@ -2025,21 +2025,23 @@ run JMeter unless all the JMeter jars ar
</target>
<target name="svnCheck" description="Use SVN to get the current revision"
unless="disable-svnCheck">
- <exec executable="svn" resultproperty="svn.exec.result"
errorproperty="svn.exec.error" failifexecutionfails="false">
+ <exec executable="svn" logerror="true" outputproperty="svn.exec.result"
failonerror="true" failifexecutionfails="true">
<arg line="info"/>
- <redirector outputproperty="svn.revision">
- <outputfilterchain>
- <linecontains>
- <contains value="Last Changed Rev: "/>
- </linecontains>
- <tokenfilter>
+ </exec>
+ <loadresource property="svn.revision">
+ <string value="${svn.exec.result}"/>
+ <filterchain>
+ <linecontains>
+ <contains value="Last Changed Rev: "/>
+ </linecontains>
+ <tokenfilter>
<!-- Remove all but the revision number -->
<replaceregex pattern=".*: " replace=""/>
- </tokenfilter>
- </outputfilterchain>
- </redirector>
- </exec>
- <echoproperties prefix="svn"/>
+ </tokenfilter>
+ <striplinebreaks/>
+ </filterchain>
+ </loadresource>
+ <echo level="info" message="svn.revision=${svn.revision}"/>
</target>
<!-- Macro is needed to be able to perform indirect evaluation of property
names -->
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]