Monday, December 13, 2010

Using SVNKit from within Groovy using SvnAnt

To load in SVN Ant you use (this assumes it's in the classpath):
ant.typedef(resource: "org/tigris/subversion/svnant/svnantlib.xml")

This then allows you to use the runSvn closures:
runSvn {
"export"(srcUrl: "", destPath: "")
"import"(url: "", path: "", message: "")
"copy"(srcUrl: "", destUrl: "", message: "")
"delete"(url: "", message: "")
"checkout"(url: "", destPath: "")
"propset"(path: "", name: "", value: "")
}

SvnAnt documentation has more details.

3 comments:

Anonymous said...

Thanks Andy! You rock!

Anonymous said...

Andy?

Touil Imad said...

Hello There,

Im a programmer too and im working on a RDF mapping for stock all my triples in a RDF/XML file But i can't do it using your Code Please if you can help me that will be Realy nice from you.

Thakns in advance.
here is my email: imad.touil@gmail.com