/** {@inheritDoc} */ public void acknowledgeProxyContext(boolean accepted, SVNErrorMessage error) { if (accepted) { log.trace("Connected to HTTP proxy " + host + ":" + port); } log.error("Unable to connect to HTTP proxy " + host + ":" + port + " recieved error:\n" + error.getFullMessage()); }
/** * Returns the informational message describing the cause * of this exception. * * @return an informational message */ public String getMessage() { SVNErrorMessage error = getErrorMessage(); if (error != null) { return error.getFullMessage(); } return super.getMessage(); }
/** * Returns the informational message describing the cause * of this exception. * * @return an informational message */ public String getMessage() { SVNErrorMessage error = getErrorMessage(); if (error != null) { return error.getFullMessage(); } return super.getMessage(); } }
/** * Returns the informational message describing the cause * of this exception. * * @return an informational message */ public String getMessage() { SVNErrorMessage error = getErrorMessage(); if (error != null) { return error.getFullMessage(); } return super.getMessage(); } }
/** * Returns the informational message describing the cause * of this exception. * * @return an informational message */ public String getMessage() { SVNErrorMessage error = getErrorMessage(); if (error != null) { return error.getFullMessage(); } return super.getMessage(); } }
/** * Gives a string representation of this object. * * @return a string describing commit info */ public String toString() { if (this == NULL) { return "EMPTY COMMIT"; } else if (myErrorMessage == null) { StringBuffer sb = new StringBuffer(); sb.append("r"); sb.append(myNewRevision); if (myAuthor != null) { sb.append(" by '"); sb.append(myAuthor); sb.append("'"); } if (myDate != null) { sb.append(" at "); sb.append(myDate); } return sb.toString(); } else { return myErrorMessage.getFullMessage(); } } }
/** * Gives a string representation of this object. * * @return a string describing commit info */ public String toString() { if (this == NULL) { return "EMPTY COMMIT"; } else if (myErrorMessage == null) { StringBuffer sb = new StringBuffer(); sb.append("r"); sb.append(myNewRevision); if (myAuthor != null) { sb.append(" by '"); sb.append(myAuthor); sb.append("'"); } if (myDate != null) { sb.append(" at "); sb.append(myDate); } return sb.toString(); } else { return myErrorMessage.getFullMessage(); } } }
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 SVNCommitInfo closeEdit() throws SVNException { if (myTxn == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_BAD_ARGS, "No valid transaction supplied to closeEdit()"); SVNErrorManager.error(err); } long committedRev = -1; SVNErrorMessage errorMessage = null; committedRev = finalizeCommit(); try { FSHooks.runPostCommitHook(myFSFS.getRepositoryRoot(), committedRev); } catch (SVNException svne) { errorMessage = SVNErrorMessage.create(SVNErrorCode.REPOS_POST_COMMIT_HOOK_FAILED, svne.getErrorMessage().getFullMessage(), SVNErrorMessage.TYPE_WARNING); } Map revProps = myFSFS.getRevisionProperties(committedRev); String dateProp = (String) revProps.get(SVNRevisionProperty.DATE); String authorProp = (String) revProps.get(SVNRevisionProperty.AUTHOR); Date datestamp = dateProp != null ? SVNTimeUtil.parseDateString(dateProp) : null; SVNCommitInfo info = new SVNCommitInfo(committedRev, authorProp, datestamp, errorMessage); releaseLocks(); myRepository.closeRepository(); return info; }
public static void error(SVNErrorMessage err, Level logLevel, SVNLogType logType) throws SVNException { if (err == null) { err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN); } SVNDebugLog.getDefaultLog().log(logType, err.getFullMessage(), logLevel); if (err.getErrorCode() == SVNErrorCode.CANCELLED) { throw new SVNCancelException(err); } else if (err.getErrorCode().isAuthentication()) { throw new SVNAuthenticationException(err); } else { throw new SVNException(err); } }
public static void error(SVNErrorMessage err, Level logLevel, SVNLogType logType) throws SVNException { if (err == null) { err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN); } SVNDebugLog.getDefaultLog().log(logType, err.getFullMessage(), logLevel); if (err.getErrorCode() == SVNErrorCode.CANCELLED) { throw new SVNCancelException(err); } else if (err.getErrorCode().isAuthentication()) { throw new SVNAuthenticationException(err); } else { throw new SVNException(err); } }
public static void error(SVNErrorMessage err, Level logLevel, SVNLogType logType) throws SVNException { if (err == null) { err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN); } SVNDebugLog.getDefaultLog().log(logType, err.getFullMessage(), logLevel); if (err.getErrorCode() == SVNErrorCode.CANCELLED) { throw new SVNCancelException(err); } else if (err.getErrorCode().isAuthentication()) { throw new SVNAuthenticationException(err); } else { throw new SVNException(err); } }
public static void error(SVNErrorMessage err) throws SVNException { if (err == null) { err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN); } SVNDebugLog.getDefaultLog().info(err.getFullMessage()); if (err.getErrorCode() == SVNErrorCode.CANCELLED) { throw new SVNCancelException(err); } else if (err.getErrorCode().isAuthentication()) { throw new SVNAuthenticationException(err); } else { throw new SVNException(err); } }
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()); } }
public SVNCommitInfo closeEdit() throws SVNException { try { if (myTxn == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_BAD_ARGS, "No valid transaction supplied to closeEdit()"); SVNErrorManager.error(err, SVNLogType.FSFS); } long committedRev = -1; if (myDeltaConsumer != null) { myDeltaConsumer.close(); } SVNErrorMessage[] errorMessage = new SVNErrorMessage[1]; committedRev = myCommitter.commitTxn(true, true, errorMessage, null); SVNProperties revProps = myFSFS.getRevisionProperties(committedRev); String dateProp = revProps.getStringValue(SVNRevisionProperty.DATE); Date datestamp = dateProp != null ? SVNDate.parseDateString(dateProp) : null; SVNErrorMessage err = errorMessage[0]; if (err != null && err.getErrorCode() == SVNErrorCode.REPOS_POST_COMMIT_HOOK_FAILED) { String message = err.getChildErrorMessage() != null ? err.getChildErrorMessage().getFullMessage() : err.getFullMessage(); err = SVNErrorMessage.create(SVNErrorCode.REPOS_POST_COMMIT_HOOK_FAILED, message, SVNErrorMessage.TYPE_WARNING); } SVNCommitInfo info = new SVNCommitInfo(committedRev, getAuthor(), datestamp, err); releaseLocks(); return info; } finally { myRepository.closeRepository(); } }
String message = err.getChildErrorMessage() != null ? err.getChildErrorMessage().getFullMessage() : err.getFullMessage(); err = SVNErrorMessage.create(SVNErrorCode.REPOS_POST_COMMIT_HOOK_FAILED, message, SVNErrorMessage.TYPE_WARNING);
public static NotifyInformation createNotifyInformation(SVNEvent event, String path) { // include full error message. String errMsg = null; if (event.getErrorMessage() != null) { errMsg = event.getErrorMessage().getFullMessage(); } return new NotifyInformation( path, JavaHLObjectFactory.getNotifyActionValue(event.getAction()), JavaHLObjectFactory.getNodeKind(event.getNodeKind()), event.getMimeType(), JavaHLObjectFactory.createLock(event.getLock()), errMsg, JavaHLObjectFactory.getStatusValue(event.getContentsStatus()), JavaHLObjectFactory.getStatusValue(event.getPropertiesStatus()), JavaHLObjectFactory.getLockStatusValue(event.getLockStatus()), event.getRevision() ); }
public static NotifyInformation createNotifyInformation(SVNEvent event, String path) { // include full error message. String errMsg = null; if (event.getErrorMessage() != null) { errMsg = event.getErrorMessage().getFullMessage(); } // TODO 16 return new NotifyInformation( path, getNotifyActionValue(event.getAction()), getNodeKind(event.getNodeKind()), event.getMimeType(), createLock(event.getLock()), errMsg, getStatusValue(event.getContentsStatus()), getStatusValue(event.getPropertiesStatus()), getLockStatusValue(event.getLockStatus()), event.getRevision(), event.getChangelistName(), createRevisionRange(event.getMergeRange()), "" ); }
public static NotifyInformation createNotifyInformation(SVNEvent event, String path) { // include full error message. String errMsg = null; if (event.getErrorMessage() != null) { errMsg = event.getErrorMessage().getFullMessage(); } // TODO 16 return new NotifyInformation( path, getNotifyActionValue(event.getAction()), getNodeKind(event.getNodeKind()), event.getMimeType(), createLock(event.getLock()), errMsg, getStatusValue(event.getContentsStatus()), getStatusValue(event.getPropertiesStatus()), getLockStatusValue(event.getLockStatus()), event.getRevision(), event.getChangelistName(), createRevisionRange(event.getMergeRange()), "" ); }
public static NotifyInformation createNotifyInformation(SVNEvent event, String path) { // include full error message. String errMsg = null; if (event.getErrorMessage() != null) { errMsg = event.getErrorMessage().getFullMessage(); } // TODO 16 return new NotifyInformation( path, getNotifyActionValue(event.getAction()), getNodeKind(event.getNodeKind()), event.getMimeType(), createLock(event.getLock()), errMsg, getStatusValue(event.getContentsStatus()), getStatusValue(event.getPropertiesStatus()), getLockStatusValue(event.getLockStatus()), event.getRevision(), event.getChangelistName(), createRevisionRange(event.getMergeRange()), "" ); }