Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to add an entry to svn:ignore without deleting previous value using Subversion commandline
    text
    copied!<p>I need to add some files to svn:ignore from the command line.</p> <p>BUT I need to do this without removing previous values of the svn:ignore property. If I use the command:</p> <pre><code>svn propset svn:ignore "*.jar" . </code></pre> <p>it sets the correct ignore value but erases every previous value, which is not what I want.</p> <p>Using <code>svn propedit</code> isn't suitable for me since I need to execute this from an Ant script.</p> <p><strong>EDIT:</strong> portability is not an issue for me (I have to work on windows) but I cannot install third-party Ant libraries, I only have the Subversion command line.</p> <p>Thanks in advance for any hint.</p> <p><strong>FINAL EDIT:</strong> to enyone interested, I implemented the suggested solution in the Ant script this way:</p> <pre><code>&lt;!-- Read current values and write them to a file --&gt; &lt;exec executable="svn" output="${build}/current-props-file"&gt; &lt;arg value="propget" /&gt; &lt;arg value="svn:ignore" /&gt; &lt;arg value="." /&gt; &lt;/exec&gt; &lt;!-- Reload the file, stripping away the value possibly already present to avoid duplicate --&gt; &lt;loadfile srcfile="${build}/current-props-file" property="cleaned-props"&gt; &lt;filterchain&gt; &lt;linecontains negate="true"&gt; &lt;contains value=".jar" /&gt; &lt;/linecontains&gt; &lt;/filterchain&gt; &lt;/loadfile&gt; &lt;echo message="cleaned-props: ${cleaned-props}" /&gt; &lt;!-- Create file with final values to set --&gt; &lt;echo file="${build}/cleaned-props-file" message="${cleaned-props}*.jar" /&gt; &lt;!-- Set property values --&gt; &lt;exec executable="svn"&gt; &lt;arg value="propset" /&gt; &lt;arg value="svn:ignore" /&gt; &lt;arg value="--file" /&gt; &lt;arg value="${build}/cleaned-props-file" /&gt; &lt;arg value="." /&gt; &lt;/exec&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload