improve svn test client

This commit is contained in:
Sebastian Sdorra
2012-02-26 14:28:58 +01:00
parent af0b5620b7
commit 280b222a0a

View File

@@ -35,7 +35,9 @@ package sonia.scm.repository.client;
//~--- non-JDK imports -------------------------------------------------------- //~--- non-JDK imports --------------------------------------------------------
import org.tmatesoft.svn.core.SVNCommitInfo;
import org.tmatesoft.svn.core.SVNDepth; import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNErrorMessage;
import org.tmatesoft.svn.core.SVNException; import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNURL; import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory;
@@ -79,6 +81,9 @@ public class SvnRepositoryClient extends AbstractRepositoryClient
DefaultSVNOptions options = new DefaultSVNOptions(); DefaultSVNOptions options = new DefaultSVNOptions();
options.setAuthStorageEnabled(false);
options.setUseAutoProperties(false);
if ((username != null) && (password != null)) if ((username != null) && (password != null))
{ {
client = SVNClientManager.newInstance(options, username, password); client = SVNClientManager.newInstance(options, username, password);
@@ -165,8 +170,16 @@ public class SvnRepositoryClient extends AbstractRepositoryClient
try try
{ {
cc.doCommit(pendingFiles.toArray(new File[0]), true, message, null, null, SVNCommitInfo info = cc.doCommit(pendingFiles.toArray(new File[0]), true,
true, true, SVNDepth.INFINITY); message, null, null, true, true,
SVNDepth.INFINITY);
SVNErrorMessage msg = info.getErrorMessage();
if (msg != null)
{
throw new RepositoryClientException(msg.getFullMessage());
}
pendingFiles.clear(); pendingFiles.clear();
} }
catch (SVNException ex) catch (SVNException ex)