0

I have a unique requirement in my project for which I'm busting my head for the last few days. I need to be able to checkout code from SVN using ANT tool. After going through some documents over the interweb (very hard to get proper documentation though) I was able to checkout code using SVNAnt extension of ANT. But here is the catch, I need to be able to checkout only specific version of the code from a desired path. As of now my checkout tag looks like this:

  <target name="checkoutLatest">
<svn username="${svnant.repository.user}" password="${svnant.repository.passwd}">
  <checkout url="${svnant.latest.url}" revision="HEAD" destPath="src_dev" />
</svn>

This although pulls everything under the svnant.latest.url path, but I am unaware how to checkout just some specific versions with this method. I explored the checkout.class from the svnant.jar file, but couldn't find anything there as well. Any ideas??

Thanks in advance!

Zoe
  • 27,060
  • 21
  • 118
  • 148
  • So, maybe... specify a revision other than HEAD? – Ernest Friedman-Hill May 26 '14 at 02:56
  • What do you mean by "specific version"? – Dante WWWW May 26 '14 at 02:56
  • @ErnestFriedman-Hill: Thanks for that. Is there any way to checkout only specific version of certain file and another version of other files through one checkout call. e.g. I want version 10 of file A and version 12 of file B. Is that possible? – BlueBantoo May 26 '14 at 03:50
  • @coolcfan: In SVN we are having several versions of the same file. I want to control which version i'm checking out through the ant script. – BlueBantoo May 26 '14 at 03:51
  • 1
    @BlueBantoo from your comment to Ernest, I can understand what you want. Well... The first thing that comes to my mind is to `update` different files to different revisions after checkout. I can't open the SVNAnt homepage searched on Google, so I don't know what SVNAnt supports, but the `svn checkout` cli command only supports directories. – Dante WWWW May 26 '14 at 07:41

0 Answers0