Thanks Dmitry, indeed 1.8.5 creates the temporary files in a temporary directory which fixes my issue.
On Tue, Apr 8, 2014 at 11:10 AM, Dmitry Pavlenko <pavle...@tmatesoft.com>wrote: > Hello Luis, > > Probably you've run into this issue: > > http://issues.tmatesoft.com/issue/SVNKIT-481 > > It was fixed at 1.8.5, please consider upgrading to the latest SVNKit > version. > > What about not working second method: I can't reproduce the problem. > Moreover, doDiff() method calls > SvnDiff operation (see SVNDiffClient#doDiff implementation), so they can't > be very different. > If the problem is reproducible for you, could you please send us a test > repository and working copy > on which the problem is reproducible. > -- > Dmitry Pavlenko, > TMate Software, > http://subgit.com/ - git-svn bridge > > > Hi, > > > > I have implemented two methods to diff a file between two revisions. The > > first one works, while the second used to work but now it doesn't. > > > > This is the one that works: > > > > public void diff(String targetName, long oldRevision, long > newRevision, > > OutputStream out) throws SVNException { > > SvnOperationFactory svnOperationFactory = new > > SvnOperationFactory(); > > svnOperationFactory.setAuthenticationManager(authenticationManager); > > SvnDiffGenerator diffGenerator = new SvnDiffGenerator(); > > diffGenerator.setDiffAdded(true); > > > > SVNURL url = buildSvnUrlWithFilePath(targetName); > > SvnDiff diff = svnOperationFactory.createDiff(); > > diff.setSource(SvnTarget.fromURL(url), > > SVNRevision.create(oldRevision), SVNRevision.create(newRevision)); > > diff.setDiffGenerator(diffGenerator); > > diff.setOutput(out); > > diff.run(); > > } > > > > And this is the one that doesn't: > > > > public void diff(String targetName, long oldRevision, long > newRevision, > > OutputStream out) throws SVNException { > > SVNURL url = buildSvnUrlWithFilePath(targetName); > > clientManager.getDiffClient().doDiff(url, SVNRevision.HEAD, > > SVNRevision.create(oldRevision), SVNRevision.create(newRevision), > > SVNDepth.INFINITY, true, out); > > } > > > > When I execute the latter, it doesn't print anything, but it doesn't > throw > > any exceptions either. Do you know what could be wrong? I'm using svnkit > > 1.8.3. > > > > Unfortunately, I can't use the first method as-is because it needs to > > create some temporary files in the current working directory and I have > no > > permissions to write there. I was hoping the second method didn't need to > > write such files... Is there any option other than changing the current > > working directory to a directory with the appropriate permissions? > > > > Many thanks, > > > > Luis Pureza >