Examples of SVNNodeKind


Examples of org.tmatesoft.svn.core.SVNNodeKind

    @SuppressWarnings( "unused" )
    private void newFile( String path,
                          String file,
                          byte[] content,
                          String message ) throws SVNException {
        SVNNodeKind childKind = defaultWorkspace.checkPath(file, -1);
        if (childKind == SVNNodeKind.NONE) {
            ScmAction addFileNodeAction = addFile(path, file, content);
            SVNActionExecutor executor = new SVNActionExecutor(defaultWorkspace);
            executor.execute(addFileNodeAction, message);
        } else {
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNNodeKind

        }
        String pathAsString = getPathAsString(path);
        if (!repositoryRootUrl.equals(inWorkspace)) {
            pathAsString = pathAsString.substring(1);
        }
        SVNNodeKind kind = repository.checkPath(pathAsString, -1);
        if (kind == SVNNodeKind.NONE) {
            // node does not exist or requested node is not correct.
            throw new PathNotFoundException(Location.create(path), null,
                                            SVNRepositoryConnectorI18n.nodeDoesNotExist.text(pathAsString));
        } else if (kind == SVNNodeKind.UNKNOWN) {
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNNodeKind

     *
     */
    public void checkout(long revision, String target, SVNDepth depth, ISVNEditor editor) throws SVNException {
        final long lastRev = revision >= 0 ? revision : getLatestRevision();
        // check path?
        SVNNodeKind nodeKind = checkPath("", revision);
        if (nodeKind == SVNNodeKind.FILE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_ILLEGAL_URL, "URL ''{0}'' refers to a file, not a directory", getLocation());
            SVNErrorManager.error(err, SVNLogType.NETWORK);
        } else if (nodeKind == SVNNodeKind.NONE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_ILLEGAL_URL, "URL ''{0}'' doesn't exist", getLocation());
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNNodeKind

                    "  endRevision is {2}", new Object[] { new Long(pegRevision),
                    new Long(startRevision), new Long(endRevision) });
            SVNErrorManager.error(err, SVNLogType.NETWORK);
        }
       
        SVNNodeKind kind = checkPath(path, pegRevision);
        if (kind == SVNNodeKind.NONE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND,
                    "Path ''{0}'' doesn''t exist in revision {1}",
                    new Object[] { reposAbsPath, new Long(pegRevision) });
            SVNErrorManager.error(err, SVNLogType.NETWORK);
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNNodeKind

    }

    private int getLocationsFromLog(String path, long pegRevision, long[] revisions,
            ISVNLocationEntryHandler handler) throws SVNException {
        String reposAbsPath = getRepositoryPath(path);
        SVNNodeKind kind = checkPath(path, pegRevision);
        if (kind == SVNNodeKind.NONE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND,
                    "Path ''{0}'' doesn''t exist in revision {1}",
                    new Object[] { reposAbsPath, new Long(pegRevision) });
            SVNErrorManager.error(err, SVNLogType.NETWORK);
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNNodeKind

    private int getFileRevisionsFromLog(String path, long startRevision, long endRevision,
            ISVNFileRevisionHandler handler) throws SVNException {
        SVNURL reposURL = getRepositoryRoot(true);
        SVNURL sessionURL = getLocation();
        String reposAbsPath = getRepositoryPath(path);
        SVNNodeKind kind = checkPath("", endRevision);
        if (kind == SVNNodeKind.DIR) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FILE, "''{0}'' is not a file",
                    reposAbsPath);
            SVNErrorManager.error(err, SVNLogType.NETWORK);
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNNodeKind

        }
       
        SVNRepository repos = createRepository(url, null, null, pegRevision, revision, null);
        url = repos.getLocation();
        long revNumber = getRevisionNumber(revision, repos, null);
        SVNNodeKind targetNodeKind = repos.checkPath("", revNumber);
        if (targetNodeKind == SVNNodeKind.FILE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNSUPPORTED_FEATURE, "URL ''{0}'' refers to a file, not a directory", url);
            SVNErrorManager.error(err, SVNLogType.WC);
        } else if (targetNodeKind == SVNNodeKind.NONE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_ILLEGAL_URL, "URL ''{0}'' doesn''t exist", url);
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNNodeKind

            dstPath.setLastModified(timestamp);
        }
    }

    private long doRemoteExport(SVNRepository repository, final long revNumber, File dstPath, String eolStyle, boolean force, SVNDepth depth) throws SVNException {
        SVNNodeKind dstKind = repository.checkPath("", revNumber);
        if (dstKind == SVNNodeKind.DIR) {
            SVNExportEditor editor = new SVNExportEditor(this, repository.getLocation().toString(), dstPath,  force, eolStyle, isExportExpandsKeywords(), getOptions());
            repository.update(revNumber, null, depth, false, new ISVNReporterBaton() {
                public void report(ISVNReporter reporter) throws SVNException {
                    reporter.setPath("", null, revNumber, SVNDepth.INFINITY, true);
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNNodeKind

       
        externalRevision = revs.length > 0 && revs[0] != null ? revs[0] : externalRevision;
        externalPegRevision = revs.length > 1 && revs[1] != null ? revs[1] : externalPegRevision;
       
        SVNRepository repository = null;
        SVNNodeKind kind = null;
        SVNURL reposRootURL = null;
        if (newURL != null) {
            long[] rev = { SVNRepository.INVALID_REVISION };
            repository = createRepository(newURL, null, null, externalPegRevision, externalRevision, rev);
            reposRootURL = repository.getRepositoryRoot(false);
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNNodeKind

            /*
             * Checks up if the specified path really corresponds to a file. 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 ) {
                logger.error( "There is no entry at '" + url + "'." );

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.