[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Getting a diff file from java svnkit

From: ajaydeo <itisajay_at_gmail.com>
Date: Sun, 18 May 2014 17:22:53 -0700 (PDT)

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 http://svn.apache.org/repos/asf/lucene/dev/trunk

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: http://subversion.1072662.n5.nabble.com/Getting-a-diff-file-from-java-svnkit-tp188659.html
Sent from the Subversion Users mailing list archive at Nabble.com.
Received on 2014-05-19 15:59:29 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.