subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajaydeo <>
Subject Getting a diff file from java svnkit
Date Mon, 19 May 2014 00:22:53 GMT
I need to get all the changes that happened in a particular svn revision. 
In short, I have revision number and URL to the svn 

To accomplish it, from command line I use following command: 
svn diff -c 1593651

Now, same thing I need to get through Java SVNKIT. 

I am using following code: 

ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
PrintStream result = new PrintStream(baos); 
File file = new File(javaClass); 
// getting svn client manager 
SVNClientManager clientManager = Utility.getSvnClientManager(); 
SVNDiffClient diffClient = clientManager.getDiffClient(); 
diffClient.doDiff(svnURL, svnRevNumber, svnRevNumber1,svnRevNumber,
SVNDepth.FILES, true, result); 
String resultString = baos.toString(); 

However, the output in resultString is always empty. 

Please, provide me with the appropriate solution. Thanking you in advance.
Appreciate it.

View this message in context:
Sent from the Subversion Users mailing list archive at

View raw message