Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can read the value of svn:ignore before updating it, then append a new line to this value and set the new value:</p> <pre><code>$ ignores=$(svn propget svn:ignore .) $ ignores="$ignores"$'\n'"*.jar" $ svn propset svn:ignore "$ignores" . </code></pre> <p>You can also use temporary file to store the older value:</p> <pre><code>$ svn propget svn:ignore . &gt; /tmp/ignores $ echo "*.jar" &gt;&gt; /tmp/ignores $ svn propset svn:ignore -F /tmp/ignores . $ rm -f /tmp/ignores </code></pre> <p>But since you're going to execute this code from an Ant script, I'd propose to implement that functionality with <a href="http://svnkit.com/" rel="nofollow noreferrer">SVNKit</a>. The code should look like this:</p> <pre><code>File target = new File(""); SVNWCClient client = SVNClientManager.newInstance().getWCClient(); SVNPropertyData oldValue = client.doGetProperty( target, SVNProperty.IGNORE, SVNRevision.WORKING, SVNRevision.WORKING ); String newValue = SVNPropertyValue.getPropertyAsString(oldValue.getValue()) + '\n' + "*.jars"; client.doSetProperty( target, SVNProperty.IGNORE, SVNPropertyValue.create(newValue), false, SVNDepth.EMPTY, ISVNPropertyHandler.NULL, Collections.emptyList() ); </code></pre> <p>In order to run this code form your ant script, put it into main method of some class IgnoresUpdate. Compile and make .class file available for the script. Then you can invoke it as follows:</p> <pre><code>&lt;java classname="IgnoresUpdate" fork="true"&gt; &lt;classpath&gt; &lt;pathelement location="/path/to/compiled/IgnoresUpdate"/&gt; &lt;pathelement location="/path/to/svnkit.jar"/&gt; &lt;/classpath&gt; &lt;/java&gt; </code></pre> <p>However, as <a href="https://stackoverflow.com/users/1156554/david">David</a> pointed out in <a href="https://stackoverflow.com/a/13648967/1065967">his answer</a>, you can use <a href="http://subclipse.tigris.org/svnant/svntask.html#ignore" rel="nofollow noreferrer">ignore task</a> which seems like the best solution in general (although it may be not applicable for you case).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

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