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

Examples of org.exist.versioning.svn.internal.wc.admin.SVNAdminArea


        SVNWCClient wcClient = new SVNWCClient((ISVNAuthenticationManager) null, null);
        wcClient.setEventHandler(getEventDispatcher());
        wcClient.doCleanup(dst);

        SVNWCAccess tgtAccess = getWCAccess();
        SVNAdminArea dir;
        String copyFromURL = null;
        long copyFromRevision = -1;
        try {
            dir = open(tgtAccess, dst, true, false, -1);
            postCopyCleanup(dir);
            if (srcEntry.isCopied()) {
                SVNEntry dstEntry = dstAccess.getEntry(dst, false);
                SVNLocationEntry info = determineCopyFromInfo(src, srcAccess, srcEntry, dstEntry);
                copyFromURL = info.getPath();
                copyFromRevision = info.getRevision();

                Map attributes = new SVNHashMap();
                attributes.put(SVNProperty.URL, copyFromURL);
                dir.modifyEntry(dir.getThisDirName(), attributes, true, false);
            } else {
                copyFromURL = srcEntry.getURL();
                copyFromRevision = srcEntry.getRevision();
            }
        } finally {
View Full Code Here


            dst.mkdirs();

            SVNWCManager.add(dst, dstParentAccess.getAdminArea(dstParent), null, SVNRepository.INVALID_REVISION, SVNDepth.INFINITY);
            copyProps(src, dst, srcAccess, dstParentAccess);
           
            SVNAdminArea srcChildArea = srcAccess.retrieve(src);

            File[] entries = SVNFileListUtil.listFiles(src);

            for (int i = 0; entries != null && i < entries.length; i++) {
                checkCancelled();
                File fsEntry = entries[i];
                String name = fsEntry.getName();
                if (SVNFileUtil.getAdminDirectoryName().equals(name)) {
                    continue;
                }

                SVNEntry entry = srcChildArea.getEntry(name, true);
                if (fsEntry.isDirectory()) {
                    copyAddedDirAdm(fsEntry, srcAccess, dst, dstParentAccess, name, entry != null);
                } else if (fsEntry.isFile()) {
                    copyAddedFileAdm(fsEntry, srcAccess, dstParentAccess, dst, name, entry != null);
                }
View Full Code Here

        }
    }

    private void copyProps(File src, File dst, SVNWCAccess srcAccess, SVNWCAccess dstAccess) throws SVNException {
        SVNEntry srcEntry = srcAccess.getVersionedEntry(src, false);
        SVNAdminArea srcArea = srcEntry.getAdminArea();
        SVNVersionedProperties srcProps = srcArea.getProperties(srcEntry.getName());
        Collection propNames = srcProps.getPropertyNames(null);
        for (Iterator propNamesIter = propNames.iterator(); propNamesIter.hasNext();) {
            String propName = (String) propNamesIter.next();
            SVNPropertyValue propValue = srcProps.getPropertyValue(propName);
            SVNPropertiesManager.setProperty(dstAccess, dst, propName, propValue, false);
View Full Code Here

        if (!files.isBinary() && status != SVNStatusType.CONFLICTED) {
            if (files.getCopyFromFile() != null) {
                status = SVNStatusType.MERGED;
            } else {
                SVNAdminArea adminArea = files.getAdminArea();
                SVNVersionedProperties props = adminArea.getProperties(files.getWCPath());
                boolean isSpecial = props.getPropertyValue(SVNProperty.SPECIAL) != null;
                 // compare merge result with 'wcFile' (in case of text and no conflict).
                boolean isSameContents = SVNFileUtil.compareFiles(isSpecial ? files.getLocalFile() :
                    files.getWCFile(), files.getResultFile(), null);
                status = isSameContents ? SVNStatusType.UNCHANGED : status;
View Full Code Here

            name = "";
        } else {
            dirPath = file.getParentFile();
            name = file.getName();
        }
        SVNAdminArea dir = null;
        try {
            dir = getWCAccess().retrieve(dirPath);
        } catch (SVNException e) {
            SVNFileType type = SVNFileType.getType(file);
            if (type == SVNFileType.NONE && e.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_LOCKED) {
                return;
            }
            throw e;
        }
       
        if (dir.getEntry(name, false) != null) {
            tweakStatusHash(myDirectoryInfo, null, file, SVNStatusType.STATUS_DELETED, SVNStatusType.STATUS_NONE, null, SVNRevision.create(revision));
            // set entry node kind
            SVNStatus status = (SVNStatus) myDirectoryInfo.myChildrenStatuses.get(file);
            if (status != null) {
                status.setRemoteStatus(null, null, null, dir.getEntry(name, false).getKind());
            }
        }
        if (myDirectoryInfo.myParent != null && !hasTarget()) {
            tweakStatusHash(myDirectoryInfo.myParent, myDirectoryInfo, myDirectoryInfo.myPath, SVNStatusType.STATUS_MODIFIED, SVNStatusType.STATUS_NONE, null, null);
        } else if (!hasTarget() && myDirectoryInfo.myParent == null) {
View Full Code Here

            if (hasTarget()) {
                File targetPath = getAnchor().getFile(getAdminAreaInfo().getTargetName());
                SVNStatus tgtStatus = (SVNStatus) myDirectoryInfo.myChildrenStatuses.get(targetPath);
                if (tgtStatus != null) {
                    if (tgtStatus.getKind() == SVNNodeKind.DIR) {
                        SVNAdminArea dir = getWCAccess().retrieve(targetPath);
                        getDirStatus(null, dir, null, getDepth(), isReportAll(), isNoIgnore(), null, true, getDefaultHandler());
                    }
                    if (isSendableStatus(tgtStatus)) {
                        getDefaultHandler().handleStatus(tgtStatus);
                    }
View Full Code Here

            if (status.getContentsStatus() != SVNStatusType.STATUS_OBSTRUCTED &&
                status.getContentsStatus() != SVNStatusType.STATUS_MISSING &&
                status.getEntry() != null && status.getKind() == SVNNodeKind.DIR &&
                (depth == SVNDepth.UNKNOWN || depth == SVNDepth.IMMEDIATES ||
                 depth == SVNDepth.INFINITY)) {
                SVNAdminArea dir = getWCAccess().retrieve(path);
                SVNDepth depthMinusOne = depth;
                if (depthMinusOne == SVNDepth.IMMEDIATES) {
                    depthMinusOne = SVNDepth.EMPTY;
                }
                getDirStatus(dirEntry, dir, null, depthMinusOne, isReportAll(), isNoIgnore(), null, true, handler);
View Full Code Here

   
    private SVNStatus createStatus(File path) throws SVNException {
        SVNEntry entry = getWCAccess().getEntry(path, false);
        SVNEntry parentEntry = null;
        if (entry != null) {
            SVNAdminArea parentDir = getWCAccess().getAdminArea(path.getParentFile());
            if (parentDir != null) {
                parentEntry = getWCAccess().getEntry(path.getParentFile(), false);
            }
        }
        return assembleStatus(path, entry != null ? getWCAccess().probeRetrieve(path) : null, entry,
View Full Code Here

                        parentStatus.getKind() == SVNNodeKind.DIR &&
                        (myDepth == SVNDepth.UNKNOWN ||
                         myDepth == SVNDepth.FILES ||
                         myDepth == SVNDepth.IMMEDIATES ||
                         myDepth == SVNDepth.INFINITY)) {
                    SVNAdminArea dir = getWCAccess().getAdminArea(myPath);
                    if (dir != null) {
                        getDirStatus(null, dir, null, SVNDepth.IMMEDIATES, true, true, null, true, this);
                        SVNStatus thisDirStatus = (SVNStatus)myChildrenStatuses.get(myPath);
                        if (thisDirStatus != null && thisDirStatus.getEntry() != null && (
                                myDepth == SVNDepth.UNKNOWN ||
View Full Code Here

        }

        public SVNAdminArea getAdminArea() throws SVNException {
            String path = getPath();
            File file = new Resource(myAdminInfo.getAnchor().getRoot(), path);
            SVNAdminArea area = myAdminInfo.getWCAccess().retrieve(file);
            if (myIsLockOnDemand && area != null && !area.isLocked()) {
                area.lock(false);
                area = myAdminInfo.getWCAccess().upgrade(file);
            }
            return area;
        }
View Full Code Here

TOP

Related Classes of org.exist.versioning.svn.internal.wc.admin.SVNAdminArea

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.