【问题标题】:using --quiet argument in ant svntask在 ant svntask 中使用 --quiet 参数
【发布时间】:2014-07-31 14:59:26
【问题描述】:

有没有办法在不查看整个输出的情况下从 ant 运行 svn status 命令? 我目前正在使用以下内容:

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

底线,我正试图悄悄地获取 svn 修订号,但由于某种原因我不能使用“信息”标签(我得到“svn 不支持嵌套信息元素”)。

【问题讨论】:

    标签: svn ant


    【解决方案1】:

    我认为您正在寻找wcVersion ant 任务:

    <!-- 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>
    

    【讨论】:

      【解决方案2】:
      <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>
      

      为我工作

      另见http://subclipse.tigris.org/svnant/svntask.html

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-09-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-09-21
        • 1970-01-01
        相关资源
        最近更新 更多