updating and than commiting to svn with java code -
* Hi all I just started using SVNkit and tried to use its features. I wanted to update the special directory first and instead of earning it in svn, but I'm facing problems code for taking update
public class test SVN conection {public static zero main (string [] Args) {DAVRepositoryFactory.setup (); FSRepositoryFactory.setup (); SVNRepositoryFactoryImpl.setup (); // This is a general way of how an SVNRepository driver creates an object: file dstPath = new file ("C: / Users / Testcases / NEWFrameWork / src / de / eb / test / generic / destinationentry /"); String url = "http: // replace / svn / navi / testtools / work / somu8950 / newfrework / src / de / eb / test / generic / destinationentry"; String user name = "user name"; String password = "password"; SVN Repository Repository = Faucet; ISVNAuthenticationManager authManager = null; Try {repository = SVNRepositoryFactory.create (SVNURL .PERSURICcode (URL)); ISVNOptions option = SVNWCUtil.createDefaultOptions (true); AuthManager = SVNWCUtil.createDefaultAuthenticationManager (username, password); Repository.setAuthenticationManager (authManager); // Some data output to verify the connection. Output. Print ("repository route:" + repository.jet repositoryRoot (true)); System.out.println ("Repository UUID:" + Repository.GetRepositoryUUID (true)); // need to identify the latest revision Latest revision = repository .getLatestRevision (); System.out.println ("Latest Repository of Repository:" + Latest Amendment); // Create client manager and set authentication SVNClientManager cm = SVNClientManager.newInstance (option, authManager); // Use SVNUpdateClient to update SVNUpdateClient uc = cm.getUpdateClient (); Long [] l = uc.doUpdate (new file [] {dstPath}, SVNRevision.HEAD, SVNDepth.INFINITY, true, true); System.out.println ("has been updated .... :) :)" + l [0]); *}
But here I am getting the error
by: java.lang.ClassNotFoundException: org.antlr.runtime.RecognitionException on line: Long [] l = uc.doUpdate (new file [] {dstPath}, SVNRevision.HEAD, SVNDepth.INFINITY, true, true); System.out.println ("has been updated .... :) :)" + l [0]); *
Even I have not worked for this either.
Please share any help or a part of the code on me.
Thanks in advance.
Comments
Post a Comment