Package org.tmatesoft.svn.core

Examples of org.tmatesoft.svn.core.SVNNodeKind


     */
    private void addToBranch(SVNLogEntryPath addEntry, SVNLogEntry logEntry, Branch branch, Transaction changeSet)
            throws SVNException,
            SVNImporterException {
        // Check if path points to a directory or a file on current revision
        SVNNodeKind nodeKind = getEntryType(addEntry, logEntry);
        // Path points to a File
        if (nodeKind == SVNNodeKind.FILE) {
            if (addEntry.getCopyPath() == null) {
                SVNVersionedFile file = (SVNVersionedFile) fModelMapper.createFile(addEntry.getPath());
                ModificationReport report =
View Full Code Here


     */
    private void addToRelease(SVNLogEntryPath addEntry, SVNLogEntry logEntry, SVNRelease release, Transaction changeSet)
            throws SVNException,
            SVNImporterException {
        // Check if path points to a directory or a file on current revision
        SVNNodeKind nodeKind = getEntryType(addEntry, logEntry);
        // Path points to a File
        if (nodeKind == SVNNodeKind.FILE) {
            if (addEntry.getCopyPath() == null) {
                // This is a file that has been added just to the release, without being in the repository
                // (sometimes it happens for READMEs and build files)
View Full Code Here

        Transaction changeSet = fModelMapper.createTransaction(date);

        for (SVNLogEntryPath logEntryPath : changedPaths) {

            // Check if path points to a directory or a file on current revision
            SVNNodeKind nodeKind = getEntryType(logEntryPath, logEntry);
            if (nodeKind == SVNNodeKind.FILE) {
                // Path points to a File
                String movedFromPath = null;
                if (moved.containsKey(logEntryPath)) {
                    movedFromPath = moved.get(logEntryPath).getPath();
View Full Code Here

        SVNLogEntryPath firstLogEntryPath = logEntryPathIterator.next();

        if ((logEntry.getMessage() != null)
                && logEntry.getMessage().contains(ImporterMessages.EvolizerSVNImporter_cvs2svnBranch)
                && !isContainedInBranch(firstLogEntryPath.getPath())) {
            SVNNodeKind nodeKind = getEntryType(firstLogEntryPath, logEntry);
            if (nodeKind == SVNNodeKind.DIR) {
                int beginIndex;
                int endIndex;
                beginIndex = logEntry.getMessage().indexOf("'");
                endIndex = logEntry.getMessage().lastIndexOf("'");
View Full Code Here

        try {
            /*
             * Checks up if the specified path/to/repository part of the URL
             * really corresponds to a directory.
             */
            SVNNodeKind nodeKind = fRepository.checkPath("", -1); // -1 corresponds to latest revision
            if (nodeKind == SVNNodeKind.NONE) {
                throw new SVNImporterException(NLS.bind(SVNConnectorMessages.SVNConnector_noEntry, fSVNBaseURL));
            } else if (nodeKind == SVNNodeKind.FILE) {
                throw new SVNImporterException(NLS.bind(SVNConnectorMessages.SVNConnector_unexpectedEntry, fSVNBaseURL));
            }
View Full Code Here

         * otherwise I analyze the SVN log. This makes it also more tolerant to repositories
         * that were moved from another location (e.g. the Apache incubation policy)
         */
        String repoRoot = fRepository.getRepositoryRoot(true).toString();
        String repoUrl = fRepository.getLocation().toString();
        SVNNodeKind trunk =
                getEntryType(repoUrl.substring(repoUrl.indexOf(repoRoot) + repoRoot.length()) + "/"
                        + SVNConnectorMessages.SVNConnector_trunk, -1, 'M');
        SVNNodeKind tags =
                getEntryType(repoUrl.substring(repoUrl.indexOf(repoRoot) + repoRoot.length()) + "/"
                        + SVNConnectorMessages.SVNConnector_tags, -1, 'M');
        SVNNodeKind branches =
                getEntryType(repoUrl.substring(repoUrl.indexOf(repoRoot) + repoRoot.length()) + "/"
                        + SVNConnectorMessages.SVNConnector_branches, -1, 'M');
        if (!trunk.equals(SVNNodeKind.NONE) && !tags.equals(SVNNodeKind.NONE) && !branches.equals(SVNNodeKind.NONE)) {
            fStandardSVNLayout = true;
        } else {
            for (SVNLogEntry logEntry : entries) {
                Map<String, SVNLogEntryPath> changedPaths = logEntry.getChangedPaths();
                if (!fCvsToSvn) {
View Full Code Here

        SVNEntry entry = null;
        if (dir != null) {
            entry = wcAccess.getEntry(path, true);
        }
        boolean replace = false;
        SVNNodeKind kind = SVNFileType.getNodeKind(fileType);
        if (entry != null) {
            if ((copyFromURL == null && !entry.isScheduledForDeletion() && !entry.isDeleted()) || entry.getDepth() == SVNDepth.EXCLUDE) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_EXISTS, "''{0}'' is already under version control", path);
                SVNErrorManager.error(err, SVNLogType.WC);
            } else if (entry.getKind() != kind) {
View Full Code Here

                    path);
            SVNErrorManager.error(err, SVNLogType.WC);
        }
       
        String schedule = entry.getSchedule();
        SVNNodeKind kind = entry.getKind();
        boolean copied = entry.isCopied();
        boolean deleted = false;
        String name = path.getName();

        if (kind == SVNNodeKind.DIR) {
View Full Code Here

        SVNWCAccess wcAccess = SVNWCAccess.newInstance(null);
        try {
            wcAccess.probeOpen(file, false, 0);
            boolean isWCRoot = wcAccess.isWCRoot(file);
            SVNEntry entry = wcAccess.getEntry(file, false);
            SVNNodeKind kind = entry != null? entry.getKind() : SVNNodeKind.FILE;
            if (kind == SVNNodeKind.FILE || !isWCRoot) {
                return file.getName();
            }
        } finally {
            wcAccess.close();
View Full Code Here

            myDroppedNodes.put(nodePath, nodePath);
            myCurrentRevisionBaton.myHadDroppedNodes = true;
        } else {
            long textContentLength = getLongFromHeaders(SVNAdminHelper.DUMPFILE_TEXT_CONTENT_LENGTH, headers);
            if (copyFromPath != null && skipPath(copyFromPath)) {
                SVNNodeKind kind = getNodeKindFromHeaders(SVNAdminHelper.DUMPFILE_NODE_KIND, headers);
                if (textContentLength >= 0 && kind == SVNNodeKind.FILE) {
                    headers.remove(SVNAdminHelper.DUMPFILE_NODE_COPYFROM_PATH);
                    headers.remove(SVNAdminHelper.DUMPFILE_NODE_COPYFROM_REVISION);
                    copyFromPath = null;
                } else {
View Full Code Here

TOP

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

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.