public Void invoke(File ws, VirtualChannel channel) throws IOException, InterruptedException { File workingCopy = new File(ws, location.getLocalDir()).getCanonicalFile(); try { ISVNAuthenticationManager sam = SVNWCUtil.createDefaultAuthenticationManager(); sam.setAuthenticationProvider(authProvider); SVNCommitClient commitClient = new SVNCommitClient(sam, null); buildListener.getLogger().println("[RELEASE] " + commitMessage); debuggingLogger.fine(String.format("Committing working copy: '%s'", workingCopy)); SVNCommitInfo commitInfo = commitClient.doCommit(new File[]{workingCopy}, true, commitMessage, null, null, true, true, SVNDepth.INFINITY); SVNErrorMessage errorMessage = commitInfo.getErrorMessage(); if (errorMessage != null) { throw new IOException("Failed to commit working copy: " + errorMessage.getFullMessage()); } return null; } catch (SVNException e) { debuggingLogger.log(Level.FINE, "Failed to Commit WorkingCopy", e); throw new IOException(e.getMessage()); } } }
/** * Returns an instance of the {@link SVNCommitClient} class. * * <p> * If it's the first time this method is being called the object is * created, initialized and then returned. Further calls to this * method will get the same object instantiated at that moment of * the first call. <b>SVNClientManager</b> does not reinstantiate * its <b>SVN</b>*<b>Client</b> objects. * * @return an <b>SVNCommitClient</b> instance */ public SVNCommitClient getCommitClient() { if (myCommitClient == null) { myCommitClient = myOperationFactory != null ? new SVNCommitClient(myOperationFactory) : new SVNCommitClient(this, myOptions); myCommitClient.setEventHandler(myEventHandler); myCommitClient.setDebugLog(getDebugLog()); myCommitClient.setIgnoreExternals(myIsIgnoreExternals); } return myCommitClient; }
/** * Returns an instance of the {@link SVNCommitClient} class. * * <p> * If it's the first time this method is being called the object is * created, initialized and then returned. Further calls to this * method will get the same object instantiated at that moment of * the first call. <b>SVNClientManager</b> does not reinstantiate * its <b>SVN</b>*<b>Client</b> objects. * * @return an <b>SVNCommitClient</b> instance */ public SVNCommitClient getCommitClient() { if (myCommitClient == null) { myCommitClient = new SVNCommitClient(this, myOptions); myCommitClient.setEventHandler(myEventHandler); myCommitClient.setDebugLog(getDebugLog()); } return myCommitClient; }
/** * Returns an instance of the {@link SVNCommitClient} class. * * <p> * If it's the first time this method is being called the object is * created, initialized and then returned. Further calls to this * method will get the same object instantiated at that moment of * the first call. <b>SVNClientManager</b> does not reinstantiate * its <b>SVN</b>*<b>Client</b> objects. * * @return an <b>SVNCommitClient</b> instance */ public SVNCommitClient getCommitClient() { if (myCommitClient == null) { myCommitClient = new SVNCommitClient(this, myOptions); myCommitClient.setEventHandler(myEventHandler); myCommitClient.setDebugLog(getDebugLog()); myCommitClient.setIgnoreExternals(myIsIgnoreExternals); } return myCommitClient; }
/** * Returns an instance of the {@link SVNCommitClient} class. * * <p> * If it's the first time this method is being called the object is * created, initialized and then returned. Further calls to this * method will get the same object instantiated at that moment of * the first call. <b>SVNClientManager</b> does not reinstantiate * its <b>SVN</b>*<b>Client</b> objects. * * @return an <b>SVNCommitClient</b> instance */ public SVNCommitClient getCommitClient() { if (myCommitClient == null) { myCommitClient = new SVNCommitClient(this, myOptions); myCommitClient.setEventHandler(myEventHandler); myCommitClient.setDebugLog(getDebugLog()); myCommitClient.setIgnoreExternals(myIsIgnoreExternals); } return myCommitClient; }
public void safeRevertTag(String tagUrl, String commitMessageSuffix) { try { log("Reverting subversion tag: " + tagUrl); SVNURL svnUrl = SVNURL.parseURIEncoded(tagUrl); SVNCommitClient commitClient = new SVNCommitClient(createAuthenticationManager(), null); SVNCommitInfo commitInfo = commitClient.doDelete(new SVNURL[]{svnUrl}, COMMENT_PREFIX + commitMessageSuffix); SVNErrorMessage errorMessage = commitInfo.getErrorMessage(); if (errorMessage != null) { log("Failed to revert '" + tagUrl + "': " + errorMessage.getFullMessage()); } } catch (SVNException e) { log("Failed to revert '" + tagUrl + "': " + e.getLocalizedMessage()); } }
SVNCommitClient commitClient = new SVNCommitClient(manager, svnOption);
SVNCommitClient commitClient = new SVNCommitClient(connection.getManager(), connection.getSvnOption());
SVNCommitClient commitClient = new SVNCommitClient(connection.getManager(), connection.getSvnOption());
SVNCommitClient commitClient = new SVNCommitClient(connection.getManager(), connection.getSvnOption());
SVNCommitClient commitClient = new SVNCommitClient(connection.getManager(), connection.getSvnOption());