Package org.exist.versioning.svn.internal.wc

Examples of org.exist.versioning.svn.internal.wc.SVNFileType


    public SVNCommitInfo doImport(File path, SVNURL dstURL, String commitMessage,
            SVNProperties revisionProperties, boolean useGlobalIgnores, boolean ignoreUnknownNodeTypes,
            SVNDepth depth) throws SVNException {
        // first find dstURL root.
        SVNRepository repos = null;
        SVNFileType srcKind = SVNFileType.getType(path);
        if (srcKind == SVNFileType.NONE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_NOT_FOUND,
                    "Path ''{0}'' does not exist", path);           
            SVNErrorManager.error(err, SVNLogType.WC);
        }
View Full Code Here


            }
            String path = importPath == null ? file.getName() : SVNPathUtil.append(importPath, file.getName());
            if (useGlobalIgnores && SVNStatusEditor.isIgnored(ignores, file, "/" + path)) {
                continue;
            }
            SVNFileType fileType = SVNFileType.getType(file);
            if (fileType == SVNFileType.DIRECTORY && depth.compareTo(SVNDepth.IMMEDIATES) >= 0) {
                editor.addDir(path, null, -1);
                changed |= true;
                SVNEvent event = SVNEventFactory.createSVNEvent(file, SVNNodeKind.DIR, null, SVNRepository.INVALID_REVISION, SVNEventAction.COMMIT_ADDED, null, null, null);
                handleEvent(event, ISVNEventHandler.UNKNOWN);
View Full Code Here

        return hasTextModifications(name, forceComparision, true, false);
    }

    public boolean hasTextModifications(String name, boolean forceComparison, boolean compareTextBase, boolean compareChecksum) throws SVNException {
        File textFile = getFile(name);
        SVNFileType fileType = SVNFileType.getType(textFile);
        if (!(fileType == SVNFileType.FILE || fileType == SVNFileType.SYMLINK)) {
            return false;
        }

        SVNEntry entry = null;
View Full Code Here

        if (!getThisDirName().equals(target)) {
            log.logRemoveRevertFile(target, this, true);
            log.logRemoveRevertFile(target, this, false);

            File baseFile = getBaseFile(target, true);
            SVNFileType baseType = SVNFileType.getType(baseFile);
            if (baseType == SVNFileType.NONE) {
                baseFile = getBaseFile(target, false);
                baseType = SVNFileType.getType(baseFile);
            }
            if (baseType == SVNFileType.FILE) {
View Full Code Here

        }
    }

    public SVNAdminArea formatWC(SVNAdminArea adminArea) throws SVNException {
        File logFile = adminArea.getAdminFile("log");
        SVNFileType type = SVNFileType.getType(logFile);
        if (type == SVNFileType.FILE) {
            SVNDebugLog.getDefaultLog().logFine(SVNLogType.WC,
                    "Changing working copy format failed: found a log file at '" + logFile + "'");
            return adminArea;
        }
View Full Code Here

            throw new SVNException(err);
        } catch (IOException e) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Cannot read entries file ''{0}'': {1}", new Object[] {entriesFile, e.getLocalizedMessage()});
            SVNErrorManager.error(err, e, SVNLogType.WC);
        } catch (SVNException svne) {
            SVNFileType type = SVNFileType.getType(path);
            if (type != SVNFileType.DIRECTORY || !entriesFile.exists()) {
                if (type == SVNFileType.NONE) {
                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "''{0}'' does not exist", path);
                    SVNErrorManager.error(err, SVNLogType.WC);
                }
View Full Code Here

        }
        SVNAdminArea adminArea = null;
        try {
            adminArea = open(dir, writeLock, false, true, depth, logLevel);
        } catch (SVNException svne) {
            SVNFileType childKind = SVNFileType.getType(path);
            SVNErrorCode errCode = svne.getErrorMessage().getErrorCode();
            if (!path.equals(dir) && childKind == SVNFileType.DIRECTORY && errCode == SVNErrorCode.WC_NOT_DIRECTORY) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_NOT_DIRECTORY, "''{0}'' is not a working copy", path);
                SVNErrorManager.error(err, logLevel, SVNLogType.WC);
            } else {
View Full Code Here

                    subEntry = dirAdminArea.getEntry(path.getName(), true);
                }
            } catch (SVNException svne) {
                subEntry = null;
            }
            SVNFileType type = SVNFileType.getType(path);
            if (subEntry != null) {
                if (subEntry.getKind() == SVNNodeKind.DIR && type == SVNFileType.FILE) {
                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_NOT_LOCKED, "Expected ''{0}'' to be a directory but found a file", path);
                    SVNErrorManager.error(err, SVNLogType.WC);
                } else if (subEntry.getKind() == SVNNodeKind.FILE && type == SVNFileType.DIRECTORY) {
                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_NOT_LOCKED, "Expected ''{0}'' to be a file but found a directory", path);
                    SVNErrorManager.error(err, SVNLogType.WC);
                }
            }
            File adminDir = new Resource(path, SVNFileUtil.getAdminDirectoryName());
            SVNFileType wcType = SVNFileType.getType(adminDir);
           
            if (type == SVNFileType.NONE) {
                SVNErrorMessage childErr = SVNErrorMessage.create(SVNErrorCode.WC_PATH_NOT_FOUND, "Directory ''{0}'' is missing", path);
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_NOT_LOCKED, "Directory ''{0}'' is missing", path);
                err.setChildErrorMessage(childErr);
View Full Code Here

   
    private static boolean ourNeverDescendIntoSymlinks = Boolean.getBoolean("svnkit.symlinks.neverDescend");

    private File probe(File path, Level logLevel) throws SVNException {
        int wcFormat = -1;
        SVNFileType type = SVNFileType.getType(path);
        boolean eligible = type == SVNFileType.DIRECTORY;
        // only treat as directories those, that are not versioned in parent wc.
        if (eligible) {
            wcFormat = SVNAdminAreaFactory.checkWC(path, true, logLevel);
        } else if (type == SVNFileType.SYMLINK && path.isDirectory()) {
View Full Code Here

            if (startEmpty) {
                myInfo.addIncompleteEntry("");
            }
            boolean missing = false;
            if (!targetEntry.isScheduledForDeletion()) {
                SVNFileType fileType = SVNFileType.getType(myTarget);
                missing = fileType == SVNFileType.NONE;
            }
            myTotalFilesCount = 1;
            myReportedFilesCount = 1;           
            if (targetEntry.isDirectory()) {
View Full Code Here

TOP

Related Classes of org.exist.versioning.svn.internal.wc.SVNFileType

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.