コマンドラインから svn:ignore にいくつかのファイルを追加する必要があります。
しかし、svn:ignore プロパティの以前の値を削除せずにこれを行う必要があります。コマンドを使用する場合:
svn propset svn:ignore "*.jar" .
正しい無視値を設定しますが、以前の値をすべて消去します。これは私が望むものではありません。
Antスクリプトからこれを実行する必要があるため、使用svn propedit
は私には適していません。
編集:移植性は私にとって問題ではありません(Windowsで作業する必要があります)が、サードパーティのAntライブラリをインストールできません。Subversionコマンドラインしかありません。
ヒントをお寄せいただきありがとうございます。
最終編集:興味のある人には、Ant スクリプトで提案されたソリューションを次のように実装しました。
<!-- Read current values and write them to a file -->
<exec executable="svn" output="${build}/current-props-file">
<arg value="propget" />
<arg value="svn:ignore" />
<arg value="." />
</exec>
<!-- Reload the file, stripping away the value possibly already present to avoid duplicate -->
<loadfile srcfile="${build}/current-props-file" property="cleaned-props">
<filterchain>
<linecontains negate="true">
<contains value=".jar" />
</linecontains>
</filterchain>
</loadfile>
<echo message="cleaned-props: ${cleaned-props}" />
<!-- Create file with final values to set -->
<echo file="${build}/cleaned-props-file" message="${cleaned-props}*.jar" />
<!-- Set property values -->
<exec executable="svn">
<arg value="propset" />
<arg value="svn:ignore" />
<arg value="--file" />
<arg value="${build}/cleaned-props-file" />
<arg value="." />
</exec>