Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Are you using svn-kit? If so, I ran into the same problem today while trying to get some tried and true build scripts migrated to a new instance of Jenkins at work. When preparing an official release, we tag with the release number and then pull the code based on the tag to build it. Like the OP, I feel like this must be a pretty standard use case.</p> <p>By the way, run ant with the -v flag and svnant will report whether it's using svnkit, javahl or falling back to the command line:</p> <pre><code> [svn] Using svnkit [svn] &lt;Export&gt; started ... [svn] export -r HEAD https://foo.com/svn/project </code></pre> <p>As best as I can tell, svnant 1.3.1 (and the version of svnkit that it depends on) simply doesn't work 100% with SVN server 1.7.x. It works fine for us for some commands, including export, but when it came time to tag by using svn copy, we were getting the same error described above:</p> <pre><code>22:06:48 [svn] copy -rHEAD https://foo.com/svn/project/trunk https://foo.com/svn/project/tags/tag3 22:06:48 [svn] svn: File not found: revision 64, path '/project/trunk/project/trunk' 22:06:48 [svn] svn: '/svn/project/!svn/bc/64/project/trunk' path not found: 404 Not Found (https://foo.com) </code></pre> <p>Thankfully, a savior was out there by the name of opticylic. Open a new tab in your browser and head on over to:</p> <p><a href="https://github.com/opticyclic/svntask" rel="nofollow">https://github.com/opticyclic/svntask</a></p> <p>Grab svntask-1.7-1.0.9.zip from the Downloads section and follow the installation instructions, largely just a matter of declaring the taskdef with the appropriate classpath. The usage of the task is slightly different from tigris' svnant. Specifically it's </p> <pre><code>&lt;copy src="url" dst="url2" commitMessage="tmbg"/&gt; </code></pre> <p>instead of </p> <pre><code>&lt;copy srcUrl="url" destUrl="url2" message="flood"/&gt;, </code></pre> <p>and the newish svnsettings are no longer supported, so you'll have to specify username and password directly in the tag.</p> <p>Once this is done, svn copy should work fine, making it possible to apply a tag from ant. N.B. make sure that opticylic's svnant task does not see any of the old svnant libraries during execution time. I previously had the svn-related jars in my ant/lib, so had to remove them in order to use opticyclic's svnant.</p> <p>Finally, I realized that svn export is unfortunately NOT supported by opticylic's svnant, but we require it for the build I was working on. As such, I was forced to make BOTH svnant's available to my build. As long as you specify both of their classpaths independently and (important!) give one of them a new name, since they both use svn as the tagname by default), you should be able to do the same:</p> <pre><code>&lt;path id="svnant.classpath"&gt; &lt;fileset dir="lib/svnant"&gt; &lt;include name="*.jar"/&gt; &lt;/fileset&gt; &lt;/path&gt; &lt;typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath"/&gt; &lt;path id="svnant2.classpath"&gt; &lt;fileset dir="lib/svn2"&gt; &lt;include name="*.jar"/&gt; &lt;/fileset&gt; &lt;/path&gt; &lt;taskdef name="svn2" classname="com.googlecode.svntask.SvnTask" classpathref="svnant2.classpath"/&gt; </code></pre> <p>Here, I've allowed tigris' svnant to claim the default 'svn' tag name while giving opticyclic's the tag svn2. In this manner, we can call either in the course of the ant script. Just remember to pay attention that you're using the correct syntax required for the svnant you're using at any given moment.</p> <p>Perhaps opticyclic will add export to their svnant, now that they have a few new fans. That would allow us to simplify the above and simply use the newer svnant outright.</p>
 

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