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/GetSubversionRevision.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/opends/src/build-tools/org/opends/build/tools/GetSubversionRevision.java b/opends/src/build-tools/org/opends/build/tools/GetSubversionRevision.java
index 80d9aca..73f86f3 100644
--- a/opends/src/build-tools/org/opends/build/tools/GetSubversionRevision.java
+++ b/opends/src/build-tools/org/opends/build/tools/GetSubversionRevision.java
@@ -34,9 +34,9 @@
 import org.apache.tools.ant.Task;
 
 import org.tmatesoft.svn.core.SVNException;
+import org.tmatesoft.svn.core.wc.SVNClientManager;
 import org.tmatesoft.svn.core.wc.SVNInfo;
 import org.tmatesoft.svn.core.wc.SVNRevision;
-import org.tmatesoft.svn.core.wc.SVNWCClient;
 
 
 
@@ -55,7 +55,9 @@
   // revision number.
   private String workspace = null;
 
-
+  // The svn client manager. Required by svnkit 1.2.x
+  private static SVNClientManager ourClientManager =
+          SVNClientManager.newInstance();
 
   /**
    * Specifies the name of the Ant property into which the Subversion revision
@@ -110,11 +112,9 @@
     }
 
 
-    SVNWCClient svnClient = new SVNWCClient(null, null);
-
     try
     {
-      SVNInfo svnInfo = svnClient.doInfo(workspacePath, SVNRevision.WORKING);
+      SVNInfo svnInfo = ourClientManager.getWCClient().doInfo(workspacePath, SVNRevision.WORKING);
       SVNRevision revision = svnInfo.getRevision();
       if (revision == null)
       {

--
Gitblit v1.10.0