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/CheckPrecommit.java | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/opends/src/build-tools/org/opends/build/tools/CheckPrecommit.java b/opends/src/build-tools/org/opends/build/tools/CheckPrecommit.java
index 2f7d8b7..257b534 100644
--- a/opends/src/build-tools/org/opends/build/tools/CheckPrecommit.java
+++ b/opends/src/build-tools/org/opends/build/tools/CheckPrecommit.java
@@ -41,14 +41,13 @@
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.FileSet;
-import org.tmatesoft.svn.core.SVNErrorMessage;
+import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.wc.SVNPropertyData;
import org.tmatesoft.svn.core.wc.SVNRevision;
import org.tmatesoft.svn.core.wc.ISVNStatusHandler;
+import org.tmatesoft.svn.core.wc.SVNClientManager;
import org.tmatesoft.svn.core.wc.SVNStatus;
-import org.tmatesoft.svn.core.wc.SVNStatusClient;
-import org.tmatesoft.svn.core.wc.SVNStatusType;
import org.tmatesoft.svn.core.wc.SVNWCClient;
@@ -125,6 +124,9 @@
// The string representation of the current year.
private String yearString;
+ // The overall SVN Client Manager. required with svnkit 1.2.x
+ private static SVNClientManager ourClientManager =
+ SVNClientManager.newInstance();
// The property client used to look at file properties.
private SVNWCClient propertyClient;
@@ -170,12 +172,12 @@
// Process the base directory and all of its subdirectories.
- SVNStatusClient svnClient = new SVNStatusClient(null, null);
- propertyClient = new SVNWCClient(null, null);
+ propertyClient = ourClientManager.getWCClient();
try
{
- svnClient.doStatus(workspacePath, true, false, false, false, false, this);
+ long status = ourClientManager.getStatusClient().doStatus(workspacePath, SVNRevision.WORKING,
+ SVNDepth.INFINITY, false, false, false, false, this, null);
}
catch (Exception e)
{
@@ -296,9 +298,9 @@
SVNPropertyData propertyData =
propertyClient.doGetProperty(file, "svn:eol-style",
SVNRevision.BASE,
- SVNRevision.WORKING, false);
+ SVNRevision.WORKING);
if ((propertyData == null) ||
- (! propertyData.getValue().equals("native")))
+ (! propertyData.getValue().getString().equals("native")))
{
eolStyleProblemFiles.add(filePath);
}
--
Gitblit v1.10.0