Package org.tmatesoft.svn.core.io

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


            doGetLocalFileContents(path, dst, revision, expandKeywords);
        } else {
            SVNRepository repos = createRepository(null, path, pegRevision, revision);
            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);
            }
            checkCancelled();
View Full Code Here


        // now get contents from URL.
        SVNRepository repos = createRepository(url, null, pegRevision, revision);
        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, SVNErrorMessage.TYPE_WARNING);
            SVNErrorManager.error(err);
        }
View Full Code Here

                if (revision == SVNRevision.HEAD) {
                    rev = -1;
                } else {
                    rev = getRevisionNumber(revision, repository, path);
                }
                SVNNodeKind kind = repository.checkPath("", rev);
                checkCancelled();
                if (kind == SVNNodeKind.NONE) {
                    if (!entry.isScheduledForAddition()) {
                        deletedInRepository[0] = true;
                    }
View Full Code Here

             * Checks up if the specified path/to/repository part of the URL
             * really corresponds to a directory. If doesn't the program exits.
             * SVNNodeKind is that one who says what is located at a path in a
             * revision. -1 means the latest revision.
             */
            SVNNodeKind nodeKind = repository.checkPath("", -1);
            if (nodeKind == SVNNodeKind.NONE) {
                throw new es.juanrak.svn.modelo.SVNException(SVNError.crearError(SVNError.ERROR_NO_SVN_ENTRADA, null, new String[] { url } ) );
            }
            else if (nodeKind == SVNNodeKind.FILE) {
                throw new es.juanrak.svn.modelo.SVNException(SVNError.crearError(SVNError.ERROR_NECESARIO_DIRECTORIO, null, new String[] { url } ) );
View Full Code Here

       
        ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(usuario, password);
        repository.setAuthenticationManager(authManager);

        try {
            SVNNodeKind nodeKind = repository.checkPath("", -1);
            if (nodeKind == SVNNodeKind.NONE) {
                throw new es.juanrak.svn.modelo.SVNException(SVNError.crearError(SVNError.ERROR_NO_SVN_ENTRADA, null, new Object[] { fd } ) );
            }
            else if (nodeKind == SVNNodeKind.FILE) {
                throw new es.juanrak.svn.modelo.SVNException(SVNError.crearError(SVNError.ERROR_NECESARIO_DIRECTORIO, null, new Object[] { fd } ) );
View Full Code Here

        }
        paths = decodedPaths;
        SVNRepository repos = createRepository(rootURL, 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);
            }
View Full Code Here

        List newPaths = new ArrayList();
        SVNURL rootURL = dstURL;
        repos = createRepository(rootURL, true);
        SVNURL reposRoot = repos.getRepositoryRoot(true);
        while (!reposRoot.equals(rootURL)) {
            if (repos.checkPath("", -1) == SVNNodeKind.NONE) {
                newPaths.add(SVNPathUtil.tail(rootURL.getPath()));
                rootURL = rootURL.removePathTail();
                repos = createRepository(rootURL, true);
            } else {
                break;
View Full Code Here

                      // now go back the tree and find if there's anything that exists
                      String repoPath = descriptor().getRelativePath(repoURL, repository);
                      String p = repoPath;
                      while(p.length()>0) {
                          p = SVNPathUtil.removeTail(p);
                          if(repository.checkPath(p,rev)==SVNNodeKind.DIR) {
                              // found a matching path
                              List<SVNDirEntry> entries = new ArrayList<SVNDirEntry>();
                              repository.getDir(p,rev,false,entries);

                              // build up the name list
View Full Code Here

                repository = getRepository(context,repoURL,credentials, Collections.<String, Credentials>emptyMap(), null);
                repository.testConnection();

                long rev = repository.getLatestRevision();
                String repoPath = getRelativePath(repoURL, repository);
                return repository.checkPath(repoPath, rev);
            } catch (SVNException e) {
                if (LOGGER.isLoggable(Level.FINE)) {
                    LogRecord lr = new LogRecord(Level.FINE,
                            "Could not check repository path {0} using credentials {1} ({2})");
                    lr.setThrown(e);
View Full Code Here

      SVNURL userRepoUrl = SVNURL.fromFile(getUserRepoDirectory(user));
      if (userRepoUrl == null) {
        return null;
      }
      SVNRepository repo = svnClientManager.createRepository(userRepoUrl, true);
      SVNNodeKind nodeKind = repo.checkPath(path, -1);
      if (nodeKind == SVNNodeKind.NONE) {
        return null;
      }
      outputStream = new ByteArrayOutputStream();
      SVNProperties fileProperty = new SVNProperties();
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.