From 208ac44ce6e3a930ca4d4cfcd1177e7bd98458dd Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Tue, 21 Oct 2008 15:30:14 +0000
Subject: [PATCH] Fix an issue where OpenDS revision number is set to -1 when using svn 1.5. The solution involves upgrading svnkit to version 1.2.0 and updating code calling svnkit.

---
 opends/src/build-tools/org/opends/build/tools/CoverageDiff.java |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/opends/src/build-tools/org/opends/build/tools/CoverageDiff.java b/opends/src/build-tools/org/opends/build/tools/CoverageDiff.java
index c9e5191..2e456de 100644
--- a/opends/src/build-tools/org/opends/build/tools/CoverageDiff.java
+++ b/opends/src/build-tools/org/opends/build/tools/CoverageDiff.java
@@ -37,13 +37,17 @@
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.BuildException;
 
+import org.tmatesoft.svn.core.SVNDepth;
 import org.tmatesoft.svn.core.SVNException;
 import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory;
+import org.tmatesoft.svn.core.wc.SVNClientManager;
 import org.tmatesoft.svn.core.wc.SVNDiffClient;
 import org.tmatesoft.svn.core.wc.SVNRevision;
 
 public class CoverageDiff extends Task {
 
+  private static SVNClientManager ourClientManager =
+          SVNClientManager.newInstance();
   private static final String EOL = System.getProperty("line.separator");
 
   private boolean verbose = false;
@@ -297,17 +301,15 @@
           throws IOException, SVNException {
     File workspaceRoot = getProject().getBaseDir();
 
-    SVNDiffClient svnClient = new SVNDiffClient(null, null);
-
     File diffFile = new File(outputPath, "svn.diff");
 
     // Most often this will be 'BASE' but it could also be 'PREVIOUS'
     SVNRevision baseRevision = SVNRevision.parse(fromRevision);
     System.out.println("Doing coverage diff from revision: " + baseRevision.toString());
 
-    svnClient.doDiff(workspaceRoot, baseRevision, workspaceRoot,
-                     SVNRevision.WORKING, true, false,
-                     new FileOutputStream(diffFile));
+    ourClientManager.getDiffClient().doDiff(workspaceRoot, baseRevision, 
+            workspaceRoot, SVNRevision.WORKING, SVNDepth.INFINITY, false,
+            new FileOutputStream(diffFile), null);
 
     return new BufferedReader(new InputStreamReader(new FileInputStream(
                                                              diffFile)));

--
Gitblit v1.10.0