Created
August 15, 2012 16:35
-
-
Save tksk/3361438 to your computer and use it in GitHub Desktop.
svnkit.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::#! | |
@echo off | |
call C:\path\to\sbt\scalas %0 %* | |
goto :eof | |
::!# | |
/*** | |
scalaVersion := "2.9.2" | |
libraryDependencies ++= Seq( | |
"org.tmatesoft.svnkit" % "svnkit" % "1.7.5-v1", | |
"org.tmatesoft.svnkit" % "svnkit-cli" % "1.7.5-v1" | |
) | |
*/ | |
import org.tmatesoft.svn.core._ | |
import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager | |
import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory | |
import org.tmatesoft.svn.core.internal.io.fs.FSRepositoryFactory | |
import org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryFactoryImpl | |
import org.tmatesoft.svn.core.io._ | |
import org.tmatesoft.svn.core.wc.SVNWCUtil | |
DAVRepositoryFactory.setup | |
import collection.JavaConversions._ | |
val repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded("http://subclipse.tigris.org/svn/subclipse/trunk")) | |
val authManager = SVNWCUtil.createDefaultAuthenticationManager("guest", "tiger") | |
repository.setAuthenticationManager(authManager) | |
for(ent <- repository.getDir("", -1, null, null.asInstanceOf[java.util.Collection[_]])) { | |
println(ent) | |
} | |
println("hit enter to close") | |
readLine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this is helpful!
when i try it i get: value foreach is not a member of java.util.Collection[?0]
how can i access stuff like ent.getAuthor?