java - SVNKit to find diff between two files stored at separate locations with separate revision numbers -


i writing java program using svnkit api, , need use correct class or call in api allow me find diff between files stored in separate locations.

1st file:

https://abc.edc.xyz.corp/svn/di-edc/tags/ab-cde-fgh-axsym-1.0.0/src/site/apt/releasenotes.apt

2nd file:

https://abc.edc.xyz.corp/svn/di-edc/tags/ab-cde-fgh-axsym-1.1.0/src/site/apt/releasenotes.apt

i have used listed api calls generate diff output, unsuccessful far.

defaultsvndiffgenerator diffgenerator = new defaultsvndiffgenerator(); diffgenerator.displayfilediff("", file1, file2, "10983", "8971", "text", "text/plain", output);  diffclient.dodiff(svnurl1, svnrevision.create(10868), svnurl2, svnrevision.create(8971), svndepth.immediates, false, system.out); 

can provide guidance on correct way this?

your code looks correct. prefer using new api:

    final svnoperationfactory svnoperationfactory = new svnoperationfactory();     try {         final bytearrayoutputstream bytearrayoutputstream = new bytearrayoutputstream();         final svndiffgenerator diffgenerator = new svndiffgenerator();         diffgenerator.setbasepath(new file(""));          final svndiff diff = svnoperationfactory.creatediff();         diff.setsources(svntarget.fromurl(url1, svnrevision1), svntarget.fromurl(url2, svnrevision1));         diff.setdiffgenerator(diffgenerator);         diff.setoutput(bytearrayoutputstream);         diff.run();     } {         svnoperationfactory.dispose();     } 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -