Package org.tmatesoft.svn.core

Examples of org.tmatesoft.svn.core.SVNProperties


            }
            File revProps = myFSFS.getRevisionPropertiesFile(baton.myRevision);
            if (!revProps.exists()) {
                OutputStream os = SVNFileUtil.openFileForWriting(revProps);
                try {
                    SVNWCProperties.setProperties(new SVNProperties(), os, SVNWCProperties.SVN_HASH_TERMINATOR);
                } finally {
                    SVNFileUtil.closeFile(os);
                }
            }
View Full Code Here


    }

    public void removeNodeProperties() throws SVNException {
        FSTransactionRoot txnRoot = myCurrentRevisionBaton.myTxnRoot;
        FSRevisionNode node = txnRoot.getRevisionNode(myCurrentNodeBaton.myPath);
        SVNProperties props = node.getProperties(myFSFS);
       
        for (Iterator propNames = props.nameSet().iterator(); propNames.hasNext();) {
            String propName = (String) propNames.next();
            myCurrentRevisionBaton.getCommitter().changeNodeProperty(myCurrentNodeBaton.myPath, propName, null);
        }
    }
View Full Code Here

        myWURL = location;
    }
   
    public void putProperty(String name, String value) {
        if (myProperties == null) {
            myProperties = new SVNProperties();
        }
        myProperties.put(name, value);      
    }
View Full Code Here

        myProperties.put(name, value);      
    }

    public void putProperty(String name, SVNPropertyValue value) {
        if (myProperties == null) {
            myProperties = new SVNProperties();
        }
        myProperties.put(name, value);
    }
View Full Code Here

        if (!myIsForce && file.exists()) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_OBSTRUCTED_UPDATE, "File ''{0}'' already exists", file);
            SVNErrorManager.error(err, SVNLogType.WC);
        }
        myCurrentFile = file;
        myFileProperties = new SVNProperties();
        myChecksum = null;
    }
View Full Code Here

        properties.setURL(baselineRelativePath);
        return properties;
    }

    public static SVNProperties filterProperties(DAVProperties source, SVNProperties target) {
        target = target == null ? new SVNProperties() : target;
        for (Iterator props = source.getProperties().keySet().iterator(); props.hasNext();) {
            DAVElement property = (DAVElement) props.next();
            String namespace = property.getNamespace();
            if (namespace.equals(DAVElement.SVN_CUSTOM_PROPERTY_NAMESPACE)) {
                String name = property.getName();
View Full Code Here

    private String myBaseChecksum;
    private SVNProperties myRevProps;
   
    public DAVCommitEditor(DAVRepository repository, DAVConnection connection, String message, ISVNWorkspaceMediator mediator, Runnable closeCallback) {
        this(repository, connection, (SVNProperties) null, mediator, closeCallback);
        myRevProps = new SVNProperties();
        if (message != null) {
            myRevProps.put(SVNRevisionProperty.LOG, message);
        }
    }
View Full Code Here

        myCloseCallback = closeCallback;
        myCommitMediator = mediator;
        myDirsStack = new Stack();
        myPathsMap = new SVNHashMap();
        myFilesMap = new SVNHashMap();
        myRevProps = revProps != null ? revProps : new SVNProperties();
    }
View Full Code Here

        Map propsCache = getPropertiesStorage(false);
        if (propsCache == null || propsCache.isEmpty()) {
            return;
        }

        SVNProperties command = new SVNProperties();
        for(Iterator entries = propsCache.keySet().iterator(); entries.hasNext();) {
            String name = (String)entries.next();
            SVNVersionedProperties props = (SVNVersionedProperties)propsCache.get(name);
            if (props.isModified()) {
                String dstPath = getThisDirName().equals(name) ? "dir-props" : "props/" + name + ".svn-work";
                dstPath = getAdminDirectory().getName() + "/" + dstPath;
               
                if (props.isEmpty()) {
                    command.put(SVNLog.NAME_ATTR, dstPath);
                    log.addCommand(SVNLog.DELETE, command, false);
                } else {
                    String tmpPath = "tmp/";
                    tmpPath += getThisDirName().equals(name) ? "dir-props" : "props/" + name + ".svn-work";
                    File tmpFile = getAdminFile(tmpPath);
                    String srcPath = getAdminDirectory().getName() + "/" + tmpPath;
                    SVNWCProperties tmpProps = new SVNWCProperties(tmpFile, srcPath);
                    tmpProps.setProperties(props.asMap());
                    command.put(SVNLog.NAME_ATTR, srcPath);
                    command.put(SVNLog.DEST_ATTR, dstPath);
                    log.addCommand(SVNLog.MOVE, command, false);
                    command.clear();
                    command.put(SVNLog.NAME_ATTR, dstPath);
                    log.addCommand(SVNLog.READONLY, command, false);
                }
                props.setModified(false);
                command.clear();
            }
        }
    }
View Full Code Here

        Map basePropsCache = getBasePropertiesStorage(false);
        if (basePropsCache == null || basePropsCache.isEmpty()) {
            return;
        }

        SVNProperties command = new SVNProperties();
        for(Iterator entries = basePropsCache.keySet().iterator(); entries.hasNext();) {
            String name = (String)entries.next();
            SVNVersionedProperties props = (SVNVersionedProperties)basePropsCache.get(name);
            if (props.isModified()) {
                String dstPath = getThisDirName().equals(name) ? "dir-prop-base" : "prop-base/" + name + ".svn-base";
                dstPath = getAdminDirectory().getName() + "/" + dstPath;
               
                if (props.isEmpty()) {
                    command.put(SVNLog.NAME_ATTR, dstPath);
                    log.addCommand(SVNLog.DELETE, command, false);
                } else {
                    String tmpPath = "tmp/";
                    tmpPath += getThisDirName().equals(name) ? "dir-prop-base" : "prop-base/" + name + ".svn-base";
                    File tmpFile = getAdminFile(tmpPath);
                    String srcPath = getAdminDirectory().getName() + "/" + tmpPath;
                    SVNWCProperties tmpProps = new SVNWCProperties(tmpFile, srcPath);
                    tmpProps.setProperties(props.asMap());
                    command.put(SVNLog.NAME_ATTR, srcPath);
                    command.put(SVNLog.DEST_ATTR, dstPath);
                    log.addCommand(SVNLog.MOVE, command, false);
                    command.clear();
                    command.put(SVNLog.NAME_ATTR, dstPath);
                    log.addCommand(SVNLog.READONLY, command, false);
                }
                props.setModified(false);
                command.clear();
            }
        }
    }
View Full Code Here

TOP

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

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.