/** * @return exception occurred * @deprecated use {@link #getErrorMessage() } instead */ public SVNException getError() { if (myErrorMessage != null) { return new SVNException(getErrorMessage()); } return null; }
/** * @deprecated use {@link #getErrorMessage() } instead */ public SVNException getError() { if (myErrorMessage != null) { return new SVNException(getErrorMessage()); } return null; }
/** * @return exception occurred * @deprecated use {@link #getErrorMessage() } instead */ public SVNException getError() { if (myErrorMessage != null) { return new SVNException(getErrorMessage()); } return null; }
/** * @return exception occurred * @deprecated use {@link #getErrorMessage() } instead */ public SVNException getError() { if (myErrorMessage != null) { return new SVNException(getErrorMessage()); } return null; }
public void printCommitInfo(SVNCommitInfo info) { if (info != null && info.getNewRevision() >= 0 && info != SVNCommitInfo.NULL) { getOut().println("Committed revision " + info.getNewRevision() + "."); if (info.getErrorMessage() != null && info.getErrorMessage().isWarning()) { getOut().println("\n" + info.getErrorMessage().getMessage()); } } }
public void printCommitInfo(SVNCommitInfo info) { if (info != null && info.getNewRevision() >= 0 && info != SVNCommitInfo.NULL) { getOut().println("Committed revision " + info.getNewRevision() + "."); if (info.getErrorMessage() != null && info.getErrorMessage().isWarning()) { getOut().println("\n" + info.getErrorMessage().getMessage()); } } }
SVNCommitInfo[] info = doCommit(new SVNCommitPacket[] {commitPacket}, keepLocks, commitMessage); if (info != null && info.length > 0) { if (info[0].getErrorMessage() != null && info[0].getErrorMessage().getErrorCode() != SVNErrorCode.REPOS_POST_COMMIT_HOOK_FAILED) { SVNErrorManager.error(info[0].getErrorMessage());
}, keepLocks, keepChangelist, commitMessage, revisionProperties); if (info != null && info.length > 0) { if (info[0].getErrorMessage() != null && info[0].getErrorMessage().getErrorCode() != SVNErrorCode.REPOS_POST_COMMIT_HOOK_FAILED) { SVNErrorManager.error(info[0].getErrorMessage(), SVNLogType.DEFAULT);
SVNCommitInfo[] info = doCommit(new SVNCommitPacket[] {commitPacket}, keepLocks, keepChangelist, commitMessage, revisionProperties); if (info != null && info.length > 0) { if (info[0].getErrorMessage() != null && info[0].getErrorMessage().getErrorCode() != SVNErrorCode.REPOS_POST_COMMIT_HOOK_FAILED) { SVNErrorManager.error(info[0].getErrorMessage(), SVNLogType.DEFAULT);
SVNCommitInfo[] info = doCommit(new SVNCommitPacket[] {commitPacket}, keepLocks, keepChangelist, commitMessage, revisionProperties); if (info != null && info.length > 0) { if (info[0].getErrorMessage() != null && info[0].getErrorMessage().getErrorCode() != SVNErrorCode.REPOS_POST_COMMIT_HOOK_FAILED) { SVNErrorManager.error(info[0].getErrorMessage(), SVNLogType.DEFAULT);
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()); } } }
public Void invoke(File ws, VirtualChannel channel) throws IOException, InterruptedException { File workingCopy = new File(ws, location.getLocalDir()).getCanonicalFile(); try { SVNURL svnUrl = SVNURL.parseURIEncoded(tagUrl); SVNCopyClient copyClient; try { copyClient = SubversionSCM.createClientManager(authProvider).getCopyClient(); } catch (NoSuchMethodError e) { //todo remove when backward compatibility not needed //fallback for older versions of org.jenkins-ci.plugins:subversion buildListener.getLogger().println( "[RELEASE] You are using an old subversion jenkins plugin, please consider upgrading."); copyClient = SubversionSCM.createSvnClientManager(authProvider).getCopyClient(); } buildListener.getLogger().println("[RELEASE] Creating subversion tag: " + tagUrl); SVNCopySource source = new SVNCopySource(SVNRevision.WORKING, SVNRevision.WORKING, workingCopy); SVNCommitInfo commitInfo = copyClient.doCopy(new SVNCopySource[]{source}, svnUrl, false, true, true, commitMessage, new SVNProperties()); SVNErrorMessage errorMessage = commitInfo.getErrorMessage(); if (errorMessage != null) { throw new IOException("Failed to create tag: " + errorMessage.getFullMessage()); } return null; } catch (SVNException e) { debuggingLogger.log(Level.FINE, "Failed to create tag", e); throw new IOException("Subversion tag creation failed: " + e.getMessage()); } } }
@Override public String call() throws DebianizingException { SvnClientManager clientManager = SubversionSCM.createClientManager(provider); try { SVNCommitPacket changeset = clientManager.getCommitClient().doCollectCommitItems(new File[] {new File(path)}, false, true, SVNDepth.INFINITY, null); if (changeset != SVNCommitPacket.EMPTY) { SVNCommitInfo commitInfo = clientManager.getCommitClient().doCommit(changeset, false, commitMessage); if (commitInfo.getErrorMessage() != null) { throw new DebianizingException(MessageFormat.format("Error while commiting <{0}>: {1}", path, commitInfo.getErrorMessage().toString())); } else { return Long.toString(commitInfo.getNewRevision()); } } else { throw new DebianizingException("There was nothing to commit."); } } catch (SVNException e) { throw new DebianizingException("SVNException: " + e.getMessage(), e); } finally { clientManager.dispose(); } } }
/** * Method description * * * @param message * * @throws RepositoryClientException */ @Override public void commit(String message) throws RepositoryClientException { checkout(); SVNCommitClient cc = client.getCommitClient(); try { SVNCommitInfo info = cc.doCommit(pendingFiles.toArray(new File[0]), true, message, null, null, true, true, SVNDepth.INFINITY); SVNErrorMessage msg = info.getErrorMessage(); if (msg != null) { throw new RepositoryClientException(msg.getFullMessage()); } pendingFiles.clear(); } catch (SVNException ex) { throw new RepositoryClientException(ex); } }
private CommitInfo getCommitInfo(SVNCommitInfo commitInfo, SVNURL repositoryRoot) throws ParseException { return new CommitInfo(commitInfo.getNewRevision(), SVNDate.formatDate(commitInfo.getDate()), commitInfo.getAuthor(), getErrorMessageString(commitInfo.getErrorMessage()), getUrlString(repositoryRoot)); }
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()); } }
if ( info.getErrorMessage() != null ) info.getErrorMessage().getMessage(), false );
if ( info.getErrorMessage() != null ) info.getErrorMessage().getMessage(), false );
if (commitResults[0].getNewRevision() < 0 && commitResults[0].getErrorMessage() != null) { throwException(new SVNException(commitResults[0].getErrorMessage()));
commitEditor = null; if (info.getErrorMessage() == null || info.getErrorMessage().getErrorCode() == SVNErrorCode.REPOS_POST_COMMIT_HOOK_FAILED) {