Examples of SVNPropertyValue


Examples of org.tmatesoft.svn.core.SVNPropertyValue

        SVNProperties propsDiff = new SVNProperties();
        for (Iterator names = props2.nameSet().iterator(); names.hasNext();) {
            String newPropName = (String) names.next();
            if (props1.containsName(newPropName)) {
                // changed.
                SVNPropertyValue oldValue = props2.getSVNPropertyValue(newPropName);
                SVNPropertyValue value = props1.getSVNPropertyValue(newPropName);
                if (oldValue != null && !oldValue.equals(value)) {
                    propsDiff.put(newPropName, oldValue);
                } else if (oldValue == null && value != null) {
                    propsDiff.put(newPropName, oldValue);
                }
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNPropertyValue

                        }
                    } else if (item instanceof SVNProperties && ch == 'l') {
                        SVNProperties props = (SVNProperties) item;
                        for (Iterator iterator = props.nameSet().iterator(); iterator.hasNext();) {
                            String name = (String) iterator.next();
                            SVNPropertyValue value = props.getSVNPropertyValue(name);
                            os.write('(');
                            os.write(' ');
                            os.write(Integer.toString(name.getBytes("UTF-8").length).getBytes("UTF-8"));
                            os.write(':');
                            os.write(name.getBytes("UTF-8"));
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNPropertyValue

   
    public static int writeRevisionProperties(SVNRepository toRepository, long revision, SVNProperties revProps) throws SVNException {
        int filteredCount = 0;
        for (Iterator propNamesIter = revProps.nameSet().iterator(); propNamesIter.hasNext();) {
            String propName = (String) propNamesIter.next();
            SVNPropertyValue propValue = revProps.getSVNPropertyValue(propName);
            if (propName.startsWith(SVNProperty.SVN_SYNC_PREFIX)) {
                filteredCount++;
            } else {
                toRepository.setRevisionPropertyValue(revision, propName, propValue);
            }
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNPropertyValue

            }
        }
       
        for(Iterator names = propNames.iterator(); names.hasNext();) {
            String propName = (String) names.next();
            SVNPropertyValue propValue = props.getSVNPropertyValue(propName);
            if (oldProps != null) {
                SVNPropertyValue oldValue = oldProps.getSVNPropertyValue(propName);
                if (oldValue != null && oldValue.equals(propValue)) {
                    continue;
                }
            }
           
            SVNWCProperties.appendProperty(propName, propValue, dumpStream);
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNPropertyValue

        SVNProperties targetProps = targetNode.getProperties(fsfs);
        SVNProperties propsDiffs = FSRepositoryUtil.getPropsDiffs(sourceProps, targetProps);
        Object[] names = propsDiffs.nameSet().toArray();
        for (int i = 0; i < names.length; i++) {
            String propName = (String) names[i];
            SVNPropertyValue propValue = propsDiffs.getSVNPropertyValue(propName);
            if (isDir) {
                editor.changeDirProperty(propName, propValue);
            } else {
                editor.changeFileProperty(editPath, propName, propValue);
            }
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNPropertyValue

        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

Examples of org.tmatesoft.svn.core.SVNPropertyValue

                        kind = child.isCollection() ? SVNNodeKind.DIR : SVNNodeKind.FILE; 
                    }
                   
                    long size = 0;
                    if ((entryFields & SVNDirEntry.DIRENT_SIZE) != 0) {
                    SVNPropertyValue sizeValue = child.getPropertyValue(DAVElement.GET_CONTENT_LENGTH);
                        if (sizeValue != null) {
                            try {
                                size = Long.parseLong(sizeValue.getString());
                            } catch (NumberFormatException nfe) {
                                SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_MALFORMED_DATA, nfe), SVNLogType.NETWORK);
                            }
                        }
                    }

                    boolean hasProperties = false;
                    if ((entryFields & SVNDirEntry.DIRENT_HAS_PROPERTIES) != 0) {
                        if (supportsDeadPropCount) {
                            SVNPropertyValue propVal = child.getPropertyValue(DAVElement.DEADPROP_COUNT);
                            if (propVal == null) {
                                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.INCOMPLETE_DATA,
                                        "Server response missing the expected deadprop-count property");
                                SVNErrorManager.error(err, SVNLogType.NETWORK);
                            } else {
                                long propCount = -1;
                                try {
                                    propCount = Long.parseLong(propVal.getString());
                                } catch (NumberFormatException nfe) {
                                    SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_MALFORMED_DATA, nfe), SVNLogType.NETWORK);
                                }
                                hasProperties = propCount > 0;
                            }
                        } else {
                            for(Iterator props = child.getProperties().keySet().iterator(); props.hasNext();) {
                                DAVElement property = (DAVElement) props.next();
                                if (DAVElement.SVN_CUSTOM_PROPERTY_NAMESPACE.equals(property.getNamespace()) ||
                                        DAVElement.SVN_SVN_PROPERTY_NAMESPACE.equals(property.getNamespace())) {
                                    hasProperties = true;
                                    break;
                                }
                            }
                        }
                    }                   
                   
                    long lastRevision = INVALID_REVISION;
                    if ((entryFields & SVNDirEntry.DIRENT_CREATED_REVISION) != 0) {
                        Object revisionStr = child.getPropertyValue(DAVElement.VERSION_NAME);
                        try {
                            lastRevision = Long.parseLong(revisionStr.toString());
                        } catch (NumberFormatException nfe) {
                            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_MALFORMED_DATA);
                            SVNErrorManager.error(err, SVNLogType.NETWORK);
                        }
                    }

                    Date date = null;
                    if ((entryFields & SVNDirEntry.DIRENT_TIME) != 0) {
                        SVNPropertyValue dateValue = child.getPropertyValue(DAVElement.CREATION_DATE);
                        if (dateValue != null) {
                            date = SVNDate.parseDate(dateValue.getString());
                        }
                    }

                    String author = null;
                    if ((entryFields & SVNDirEntry.DIRENT_LAST_AUTHOR) != 0) {
                        SVNPropertyValue authorValue = child.getPropertyValue(DAVElement.CREATOR_DISPLAY_NAME);
                        author = authorValue == null ? null : authorValue.getString();
                    }
                   
                    SVNURL childURL = getLocation().setPath(fullPath, true);
                    childURL = childURL.appendPath(name, false);
                    SVNDirEntry dirEntry = new SVNDirEntry(childURL, repositryRoot, name, kind, size, hasProperties, lastRevision, date, author);
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNPropertyValue

                try {
                    lastRevision = Long.parseLong(revisionStr.toString());
                } catch (NumberFormatException nfe) {
                    SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_MALFORMED_DATA, nfe), SVNLogType.NETWORK);
                }
                SVNPropertyValue sizeValue = child.getPropertyValue(DAVElement.GET_CONTENT_LENGTH);
                long size = 0;
                if (sizeValue != null) {
                    try {
                        size = Long.parseLong(sizeValue.getString());
                    } catch (NumberFormatException nfe) {
                        SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_MALFORMED_DATA, nfe), SVNLogType.NETWORK);
                    }
                }
                if (child.isCollection()) {
                    kind = SVNNodeKind.DIR;
                }
                SVNPropertyValue authorValue = child.getPropertyValue(DAVElement.CREATOR_DISPLAY_NAME);
                String author = authorValue == null ? null : authorValue.getString();
                SVNPropertyValue dateValue = child.getPropertyValue(DAVElement.CREATION_DATE);
                Date date = dateValue != null ? SVNDate.parseDate(dateValue.getString()) : null;
                connection.fetchRepositoryRoot(this);
                SVNURL repositoryRoot = getRepositoryRoot(false);
                SVNURL childURL = getLocation().setPath(fullPath, true);
                if ("".equals(name)) {
                    parent[0] = new SVNDirEntry(childURL, repositoryRoot, name, kind, size, false, lastRevision,
                            date, author);
                    SVNPropertyValue vcc = child.getPropertyValue(DAVElement.VERSION_CONTROLLED_CONFIGURATION);
                    parentVCC[0] = vcc == null ? null : vcc.getString();
                } else {
                    childURL = childURL.appendPath(name, false);
                    if (entries != null) {
                      entries.add(new SVNDirEntry(childURL, repositoryRoot, name, kind, size, false, lastRevision,
                              date, author));
                    }
                    vccs.add(child.getPropertyValue(DAVElement.VERSION_CONTROLLED_CONFIGURATION));
                }
            }

            if (includeComments) {
                DAVElement logProperty = DAVElement.getElement(DAVElement.SVN_SVN_PROPERTY_NAMESPACE, "log");
                Iterator ents = entries != null ? entries.iterator() : null;
                SVNDirEntry entry = parent[0];
                String vcc = parentVCC[0];
                int index = 0;
                while(true) {
                    String label = Long.toString(entry.getRevision());
                    if (entry.getDate() != null && getOptions().hasCommitMessage(this, entry.getRevision())) {
                        String message = getOptions().getCommitMessage(this, entry.getRevision());
                        entry.setCommitMessage(message);
                    } else if (entry.getDate() != null) {
                        final SVNDirEntry currentEntry = entry;
                        String commitMessage = null;
                        try {
                            commitMessage = DAVUtil.getPropertyValue(connection, vcc, label, logProperty);
                        } catch (SVNException e) {
                            if (e.getErrorMessage().getErrorCode() != SVNErrorCode.RA_DAV_PROPS_NOT_FOUND) {
                                throw e;
                            }
                        }
                        getOptions().saveCommitMessage(DAVRepository.this, currentEntry.getRevision(), commitMessage);
                        currentEntry.setCommitMessage(commitMessage);
                    }
                    if (ents != null && ents.hasNext()) {
                        entry = (SVNDirEntry) ents.next();
                        SVNPropertyValue vccValue = (SVNPropertyValue) vccs.get(index);
                        vcc = vccValue != null ? vccValue.getString() : null;
                        index++;
                    } else {
                        break;
                    }
                }
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNPropertyValue

        try {
            lastRevision = Long.parseLong(revisionStr.toString());
        } catch (NumberFormatException nfe) {
            SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_MALFORMED_DATA, nfe), SVNLogType.NETWORK);
        }
        SVNPropertyValue sizeValue = child.getPropertyValue(DAVElement.GET_CONTENT_LENGTH);
       
        long size = 0;
        if (sizeValue != null) {
            try {
                size = Long.parseLong(sizeValue.getString());
            } catch (NumberFormatException nfe) {
                SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_MALFORMED_DATA, nfe), SVNLogType.NETWORK);
            }
        }
        if (child.isCollection()) {
            kind = SVNNodeKind.DIR;
        }
        SVNPropertyValue authorValue = child.getPropertyValue(DAVElement.CREATOR_DISPLAY_NAME);
        String author = authorValue == null ? null : authorValue.getString();
        SVNPropertyValue dateValue = child.getPropertyValue(DAVElement.CREATION_DATE);
        Date date = dateValue != null ? SVNDate.parseDate(dateValue.getString()) : null;
        boolean hasProperties = false;
        for (Iterator props = child.getProperties().keySet().iterator(); props.hasNext();) {
            DAVElement property = (DAVElement) props.next();
            if (DAVElement.SVN_CUSTOM_PROPERTY_NAMESPACE.equals(property.getNamespace()) ||
                    DAVElement.SVN_SVN_PROPERTY_NAMESPACE.equals(property.getNamespace())) {
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNPropertyValue

    }
   
    public String doMakeActivity(ISVNWorkspaceMediator mediator) throws SVNException {
        String url = null;
        if (mediator != null) {
            SVNPropertyValue property = mediator.getWorkspaceProperty("", SVNProperty.ACTIVITY_URL);
            if (property != null && property.isString()) {
                url = property.getString();
            }
        }
        String locationPath = SVNEncodingUtil.uriEncode(getLocation().getPath());
        if (url == null) {
            url = getActivityCollectionURL(locationPath, false);
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.