views:

19

answers:

1

Is there a way to run an svn status command from ant without seeing the whole output? I'm currently using the following:

<svn><status path="." revisionProperty="build.number" /></svn>

Bottom line, i'm trying to quietly get the svn revision number and for some reason I can't use the "info" tag (I get "svn doesn't support nested info elements").

A: 

I think you're looking for the wcVersion ant task:

<!-- Install the SVN Tasks -->
<path id="svnant.classpath">
    <fileset dir="${svnant.dir}">
        <include name="*.jar" />
    </fileset>
</path>

<!-- Retrieve info about the Working Copy's SVN Repo -->
<svn>
    <wcVersion path="${workingcopy.dir}" />
</svn>
<echo>Working Copy ${workingcopy.dir} is linked to SVN Repo: ${repository.url}</echo>
JonnyReeves