Package org.tmatesoft.svn.core

Examples of org.tmatesoft.svn.core.SVNErrorCode


        }
        try {
            return setupCopy(sources, new SVNPath(dst.toString()), isMove, makeParents, commitMessage,
                    revisionProperties);
        } catch (SVNException e) {
            SVNErrorCode err = e.getErrorMessage().getErrorCode();
            if (!failWhenDstExists && sources.length == 1 && (err == SVNErrorCode.ENTRY_EXISTS || err == SVNErrorCode.FS_ALREADY_EXISTS)) {
                SVNCopySource source = sources[0];
                String baseName = source.getName();
                if (!source.isURL()) {
                    baseName = SVNEncodingUtil.uriEncode(baseName);
View Full Code Here


            for (Iterator cmds = commands.iterator(); cmds.hasNext();) {
                SVNProperties command = (SVNProperties) cmds.next();
                String name = command.getStringValue("");
                String attrName = command.getStringValue(SVNLog.NAME_ATTR);
                if (attrName == null && !SVNLog.UPGRADE_FORMAT.equals(name)) {
                    SVNErrorCode code = count <= 1 ? SVNErrorCode.WC_BAD_ADM_LOG_START : SVNErrorCode.WC_BAD_ADM_LOG;
                    SVNErrorMessage err = SVNErrorMessage.create(code,
                            "Log entry missing ''name'' attribute (entry ''{0}'' for directory ''{1}'')",
                            new Object[] { name, myAdminArea.getRoot() });
                    SVNErrorManager.error(err, SVNLogType.WC);
                }
View Full Code Here

        CopyFromReceiver receiver = new CopyFromReceiver(targetPath);
            try {
                repos.log(new String[] { "" }, pegRev[0], 1, true, true, 0, false, new String[0], receiver);
                copyFromEntry = receiver.getCopyFromLocation();
            } catch (SVNException e) {
                SVNErrorCode errCode = e.getErrorMessage().getErrorCode();
                if (errCode == SVNErrorCode.FS_NOT_FOUND || errCode == SVNErrorCode.RA_DAV_REQUEST_FAILED) {
                    return new SVNLocationEntry(SVNRepository.INVALID_REVISION, null);
                }
                throw e;
            }
View Full Code Here

                            SVNURL startURL = locations[0].getURL();
                            if (!mergeSourceURL.equals(startURL)) {
                                adjustedRanges.add(range);
                            }
                        } catch (SVNException svne) {
                            SVNErrorCode code = svne.getErrorMessage().getErrorCode();
                            if (code == SVNErrorCode.CLIENT_UNRELATED_RESOURCES ||
                                    code == SVNErrorCode.RA_DAV_PATH_NOT_FOUND ||
                                    code == SVNErrorCode.FS_NOT_FOUND) {
                                adjustedRanges.add(range);
                            } else {
View Full Code Here

                            hasMergeInfoFromMergeSrc = true;
                        } else {
                          SVNURL mergeInfoURL = sourceRootURL.appendPath(mergeSrcChildPath, false);
                          SVNRevision pegRevision = SVNRevision.create(revision1 < revision2 ?
                              revision2 : revision1);
                          SVNErrorCode code = null;
                          SVNURL originalURL = null;
                          try {
                            originalURL = ensureSessionURL(repository, mergeInfoURL);
                            getLocations(mergeInfoURL, null, repository, pegRevision,
                                SVNRevision.create(revision1), SVNRevision.create(revision2));
View Full Code Here

                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_NOT_READY_TO_MERGE,
                            "Cannot reverse-merge a range from a path's own future history; try updating first");
                    SVNErrorManager.error(err, SVNLogType.DEFAULT);
                }
            } catch (SVNException svne) {
                SVNErrorCode code = svne.getErrorMessage().getErrorCode();
                if (!(code == SVNErrorCode.FS_NOT_FOUND || code == SVNErrorCode.RA_DAV_PATH_NOT_FOUND ||
                        code == SVNErrorCode.CLIENT_UNRELATED_RESOURCES)) {
                    throw svne;
                }
            }
View Full Code Here

        String relativePath = getPathRelativeToRoot(null, primaryURL, repository.getRepositoryRoot(true), null, repository);
        List locationSegments = null;
        try {
            locationSegments = repository.getLocationSegments(relativePath, pegRev, startRev, endRev);
        } catch (SVNException e) {
            SVNErrorCode errCode = e.getErrorMessage().getErrorCode();
            if (errCode == SVNErrorCode.FS_NOT_FOUND || errCode == SVNErrorCode.RA_DAV_REQUEST_FAILED) {
                if (isRollback) {
                    SVNDirEntry entry = repository.info(relativePath, rev2);
                    childDeletedOrNonexistant[0] = entry == null;
                } else {
View Full Code Here

    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

    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

    public boolean handleWarning(SVNErrorMessage err, SVNErrorCode[] warningCodes, boolean quiet) throws SVNException {
        if (err == null) {
            return true;
        }
        SVNErrorCode code = err.getErrorCode();
        for (int i = 0; i < warningCodes.length; i++) {
            if (code == warningCodes[i]) {
                if (!quiet) {
                    err.setType(SVNErrorMessage.TYPE_WARNING);
                    err.setChildErrorMessage(null);
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.SVNErrorCode

Copyright © 2018 www.massapicom. 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.