Examples of SVNErrorCode


Examples of org.tmatesoft.svn.core.SVNErrorCode

            try {
                items = read("l", null, false);
                items = (List) items.get(0);
            } catch (SVNException e) {
                if (e.getErrorMessage() != null) {
                    SVNErrorCode code = e.getErrorMessage().getErrorCode();
                    if (code == SVNErrorCode.FS_PATH_ALREADY_LOCKED || code == SVNErrorCode.FS_OUT_OF_DATE) {
                        error = e.getErrorMessage();
                    }
                }
                if (error == null) {
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorCode

            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_SVN_MALFORMED_DATA, "Malformed error list");
            SVNErrorManager.error(err, SVNLogType.NETWORK);
        }
        List errorItems = parseTuple(DEAFAULT_ERROR_TEMPLATE, item.getItems(), null);
        int code = ((Long) errorItems.get(0)).intValue();
        SVNErrorCode errorCode = SVNErrorCode.getErrorCode(code);
        String errorMessage = getString(errorItems, 1);
        errorMessage = errorMessage == null ? "" : errorMessage;
        //errorItems contains 2 items more (file and line), no sense to use them.
        return SVNErrorMessage.create(errorCode, errorMessage);
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorCode

        int code = readNumber(pis);
        String errorMessage = readString(pis);
        readString(pis);
        readNumber(pis);
        readChar(pis, ')');
        SVNErrorCode errorCode = SVNErrorCode.getErrorCode(code);       
        return SVNErrorMessage.create(errorCode, errorMessage);
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorCode

        return sb.toString();

    }
   
    public static SVNErrorMessage createDefaultErrorMessage(SVNURL host, HTTPStatus status, String context, Object[] contextObjects) {
        SVNErrorCode errorCode = SVNErrorCode.RA_DAV_REQUEST_FAILED;
        String message = status != null ? status.getCode() + " " + status.getReason() : "";
        if (status != null && status.getCode() == HttpURLConnection.HTTP_FORBIDDEN || status.getCode() == HttpURLConnection.HTTP_UNAUTHORIZED) {
            errorCode = SVNErrorCode.RA_NOT_AUTHORIZED;
            message = status.getCode() + " " + status.getReason();
        } else if (status != null && status.getCode() == HttpURLConnection.HTTP_NOT_FOUND) {
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorCode

            SVNErrorMessage error = null;
            try {
                read("[(L)]", buffer, false);
            } catch (SVNException e) {               
                if (e.getErrorMessage() != null) {
                    SVNErrorCode code = e.getErrorMessage().getErrorCode();
                    if (code == SVNErrorCode.FS_PATH_ALREADY_LOCKED || code == SVNErrorCode.FS_OUT_OF_DATE) {
                        error = e.getErrorMessage();                           
                    }
                }
                if (error == null) {
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorCode

    public static boolean isLockError(SVNErrorMessage err) {
        if (err == null) {
            return false;
        }
        SVNErrorCode errCode = err.getErrorCode();
        return errCode == SVNErrorCode.FS_PATH_ALREADY_LOCKED || errCode == SVNErrorCode.FS_OUT_OF_DATE;
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorCode

    public static boolean isUnlockError(SVNErrorMessage err) {
        if (err == null) {
            return false;
        }
        SVNErrorCode errCode = err.getErrorCode();
        return errCode == SVNErrorCode.FS_PATH_NOT_LOCKED || errCode == SVNErrorCode.FS_BAD_LOCK_TOKEN || errCode == SVNErrorCode.FS_LOCK_OWNER_MISMATCH || errCode == SVNErrorCode.FS_NO_SUCH_LOCK
                || errCode == SVNErrorCode.RA_NOT_LOCKED || errCode == SVNErrorCode.FS_LOCK_EXPIRED;
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorCode

        }
        boolean created = false;
        try {
            created = myLockFile.createNewFile();
        } catch (IOException e) {
            SVNErrorCode code = e.getMessage().indexOf("denied") >= 0 ? SVNErrorCode.WC_LOCKED : SVNErrorCode.WC_NOT_LOCKED;
            SVNErrorMessage err = SVNErrorMessage.create(code, "Cannot lock working copy ''{0}'': {1}",
                    new Object[] {getRoot(), e.getLocalizedMessage()});
            SVNErrorManager.error(err, e);
        }
        if (created) {
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorCode

                try {
                     lock = myConnection.doLock(path, this, comment, force, revisionNumber);
                } catch (SVNException e) {
                    error = null;
                    if (e.getErrorMessage() != null) {
                        SVNErrorCode code = e.getErrorMessage().getErrorCode();
                        if (code == SVNErrorCode.FS_PATH_ALREADY_LOCKED || code == SVNErrorCode.FS_OUT_OF_DATE) {
                            error = e.getErrorMessage();                           
                        }
                    }
                    if (error == null) {
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorCode

                   
                    boolean useCommitTimes = getOptions().isUseCommitTimes();
                    reverted |= doRevert(path, info.getAnchor(), recursive, useCommitTimes);           
                } catch (SVNException e) {
                    reverted |= true;
                    SVNErrorCode code = e.getErrorMessage().getErrorCode();
                    if (code == SVNErrorCode.ENTRY_NOT_FOUND || code == SVNErrorCode.UNVERSIONED_RESOURCE) {
                        SVNEvent event = SVNEventFactory.createSkipEvent(path.getParentFile(), path, SVNEventAction.SKIP, SVNEventAction.REVERT, null);
                        dispatchEvent(event);
                    }
                    if (paths.length == 1) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.