开发者

using --quiet argument in ant svntask

Is there 开发者_Python百科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").


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>


<svn svnkit="true">
    <wcVersion path="." prefix="svn.wcv." processUnversioned="true" />
    <status path="${basedir}" revisionProperty="svn.revision" textStatusProperty="svn.textStatus"
            propStatusProperty="snv.propStatus" lastChangedRevisionProperty="svn.lastCommitRevision"
            lastCommitAuthorProperty="svn.lastCommitAuthor" />
</svn>

works for me

also see http://subclipse.tigris.org/svnant/svntask.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜