Examples of checkPath()


Examples of org.tmatesoft.svn.core.io.SVNRepository.checkPath()

            String reposPath = topSrcRepos.getLocation().toString();
            for (Iterator pairs = copyPairs.iterator(); pairs.hasNext();) {
                CopyPair pair = (CopyPair) pairs.next();
                String relativePath = SVNPathUtil.getPathAsChild(reposPath, pair.mySource);
                relativePath = SVNEncodingUtil.uriDecode(relativePath);
                SVNNodeKind kind = topSrcRepos.checkPath(relativePath, pair.mySourceRevisionNumber);
                if (kind == SVNNodeKind.NONE) {
                    SVNErrorMessage err;
                    if (pair.mySourceRevisionNumber >= 0) {
                        err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "Path ''{0}'' not found in revision {1}",
                                new Object[] {SVNURL.parseURIEncoded(pair.mySource), new Long(pair.mySourceRevisionNumber)});
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNRepository.checkPath()

                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNSUPPORTED_FEATURE,
                            "Server does not support retrieving information about the repository root");
                    SVNErrorManager.error(err, SVNLogType.WC);
                }
               
                SVNNodeKind urlKind = repos.checkPath("", revNum[0]);
                if (urlKind == SVNNodeKind.NONE) {
                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_ILLEGAL_URL,
                            "URL ''{0}'' non-existent in revision {1}",
                            new Object[]{ url, new Long(revNum[0]) });
                    SVNErrorManager.error(err, SVNLogType.WC);
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNRepository.checkPath()

            doGetLocalFileContents(path, dst, revision, expandKeywords);
        } else {
            SVNRepository repos = createRepository(null, path, null, pegRevision, revision, null);
            checkCancelled();
            long revNumber = getRevisionNumber(revision, repos, path);
            SVNNodeKind kind = repos.checkPath("", revNumber);
            if (kind == SVNNodeKind.DIR) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_IS_DIRECTORY,
                        "URL ''{0}'' refers to a directory", repos.getLocation());
                SVNErrorManager.error(err, SVNLogType.WC);
            }
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNRepository.checkPath()

        // now get contents from URL.
        SVNRepository repos = createRepository(url, null, null, pegRevision, revision, null);
        checkCancelled();
        long revNumber = getRevisionNumber(revision, repos, null);
        checkCancelled();
        SVNNodeKind nodeKind = repos.checkPath("", revNumber);
        checkCancelled();
        if (nodeKind == SVNNodeKind.DIR) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_IS_DIRECTORY, "URL ''{0}'' refers to a directory", url);
            SVNErrorManager.error(err, SVNLogType.WC);
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNRepository.checkPath()

        if (makeParents) {
            CopyPair pair = (CopyPair) copyPairs.get(0);
            if (!pair.myDst.equals(rootURL)) {
                oldLocation = nonTopRepos.getLocation();
                nonTopRepos.setLocation(SVNURL.parseURIEncoded(pair.myDst).removePathTail(), false);
                SVNNodeKind kind = nonTopRepos.checkPath("", -1);
                while (kind == SVNNodeKind.NONE) {
                    newDirs.add(nonTopRepos.getLocation().toString());
                    nonTopRepos.setLocation(nonTopRepos.getLocation().removePathTail(), false);
                    kind = nonTopRepos.checkPath("", -1);
                }
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNRepository.checkPath()

                    "Setting property ''{0}'' on non-local target ''{1}'' is not supported",
                    new Object[]{propName, url});
            SVNErrorManager.error(err, SVNLogType.WC);
        }

        SVNNodeKind kind = repos.checkPath("", revNumber);
        if (kind == SVNNodeKind.NONE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND,
                    "Path ''{0}'' does not exist in revision {1}",
                    new Object[]{ url.getPath(), new Long(revNumber) });
            SVNErrorManager.error(err, SVNLogType.WC);
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNRepository.checkPath()

                nonTopRepos.setLocation(SVNURL.parseURIEncoded(pair.myDst).removePathTail(), false);
                SVNNodeKind kind = nonTopRepos.checkPath("", -1);
                while (kind == SVNNodeKind.NONE) {
                    newDirs.add(nonTopRepos.getLocation().toString());
                    nonTopRepos.setLocation(nonTopRepos.getLocation().removePathTail(), false);
                    kind = nonTopRepos.checkPath("", -1);
                }
            }
        } else if (Boolean.getBoolean("svnkit.compatibleHash")) {           
            // XXX: hack for tests to generate error message tests will like.
            // do not check paths above repository root.
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNRepository.checkPath()

            // do not check paths above repository root.
            CopyPair pair = (CopyPair) copyPairs.get(0);
            if (!pair.myDst.equals(rootURL)) {
                oldLocation = nonTopRepos.getLocation();
                nonTopRepos.setLocation(SVNURL.parseURIEncoded(pair.myDst).removePathTail(), false);
                SVNNodeKind kind = nonTopRepos.checkPath("", -1);
                if (kind == SVNNodeKind.NONE) {
                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "''{0}'' path not found", nonTopRepos.getLocation());
                    SVNErrorManager.error(err, SVNLogType.WC);
                }
            }
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNRepository.checkPath()

         * Get type of the node located at URL we used to create SVNRepository.
         *
         * "" (empty string) is path relative to that URL,
         * -1 is value that may be used to specify HEAD (latest) revision.
         */
        SVNNodeKind nodeKind = repository.checkPath("", -1);
        if (nodeKind == SVNNodeKind.NONE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "No entry at URL ''{0}''", url);
            throw new SVNException(err);
        } else if (nodeKind == SVNNodeKind.FILE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "Entry at URL ''{0}'' is a file while directory was expected", url);
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNRepository.checkPath()

        }
        paths = decodedPaths;
        SVNRepository repos = createRepository(rootURL, null, null, true);
        for (Iterator commitPath = paths.iterator(); commitPath.hasNext();) {
            String path = (String) commitPath.next();
            SVNNodeKind kind = repos.checkPath(path, -1);
            if (kind == SVNNodeKind.NONE) {
                SVNURL url = rootURL.appendPath(path, false);
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND,
                        "URL ''{0}'' does not exist", url);
                SVNErrorManager.error(err, SVNLogType.DEFAULT);
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.