Package org.tmatesoft.svn.core.internal.util

Examples of org.tmatesoft.svn.core.internal.util.SVNHashMap.containsKey()


       
        collectChangedMergeInfo(addedMergeInfoCatalog, deletedMergeInfoCatalog, revision);
       
        for (int i = 0; i < paths.length; i++) {
            String path = paths[i];
            if (deletedMergeInfoCatalog.containsKey(path)) {
                continue;
            }
            long[] appearedRevision = new long[] {-1};
            SVNLocationEntry prevLocation = null;
            try {
View Full Code Here


            if (includeComment && entries != null) {
                Map messages = new SVNHashMap();
                for (Iterator ents = entries.iterator(); ents.hasNext();) {
                    SVNDirEntry entry = (SVNDirEntry) ents.next();
                    Long key = getRevisionObject(entry.getRevision());
                    if (messages.containsKey(key)) {
                        entry.setCommitMessage((String) messages.get(key));
                        continue;
                    }
                    buffer = new Object[]{"rev-prop", key, SVNRevisionProperty.LOG};
                    write("(w(ns))", buffer);
View Full Code Here

                    String value = attributes.getStringValue(attrName);
                    attrName = SVNProperty.SVN_ENTRY_PREFIX + attrName;
                    entryAttrs.put(attrName, value);
                }
               
                if (entryAttrs.containsKey(SVNProperty.TEXT_TIME)) {
                    String value = (String) entryAttrs.get(SVNProperty.TEXT_TIME);
                    if (SVNLog.WC_TIMESTAMP.equals(value)) {
                        File file = adminArea.getFile(fileName);
                        value = SVNDate.formatDate(new Date(file.lastModified()));
                        entryAttrs.put(SVNProperty.TEXT_TIME, value);
View Full Code Here

                        value = SVNDate.formatDate(new Date(file.lastModified()));
                        entryAttrs.put(SVNProperty.TEXT_TIME, value);
                    }
                }

                if (entryAttrs.containsKey(SVNProperty.PROP_TIME)) {
                    String value = (String) entryAttrs.get(SVNProperty.PROP_TIME);
                    if (SVNLog.WC_TIMESTAMP.equals(value)) {
                        SVNEntry entry = adminArea.getEntry(fileName, false);
                        if (entry == null) {
                            return;
View Full Code Here

                        value = adminArea.getPropertyTime(fileName);
                        entryAttrs.put(SVNProperty.PROP_TIME, value);
                    }               
                }

                if (entryAttrs.containsKey(SVNProperty.WORKING_SIZE)) {
                    String workingSize = (String) entryAttrs.get(SVNProperty.WORKING_SIZE);
                    if (SVNLog.WC_WORKING_SIZE.equals(workingSize)) {
                        SVNEntry entry = adminArea.getEntry(fileName, false);
                        if (entry == null) {
                            return;
View Full Code Here

        Map matchesTable = new SVNHashMap();
        for(int i = 0; i < dataLength; i+= blockLength) {
            int length = i + blockLength >= dataLength ? dataLength - i : blockLength;
            adler32.add(data, i, length);
            Integer checksum = new Integer(adler32.getValue());
            if (!matchesTable.containsKey(checksum)) {
                matchesTable.put(checksum, new Match(i, length));
            }
            adler32.reset();
        }
        return matchesTable;
View Full Code Here

                List uniqueDirsToLockRecursively = new ArrayList();
                uniqueDirsToLockRecursively.addAll(dirsToLockRecursively);
                Map processedPaths = new SVNHashMap();
                for(Iterator ps = uniqueDirsToLockRecursively.iterator(); ps.hasNext();) {
                    String pathToLock = (String) ps.next();
                    if (processedPaths.containsKey(pathToLock)) {
                        //remove any duplicates
                        ps.remove();
                        continue;
                    }
                    processedPaths.put(pathToLock, pathToLock);
View Full Code Here

            File path = paths[i];
            File rootPath = path;
            if (rootPath.isFile()) {
                rootPath = rootPath.getParentFile();
            }
            File wcRoot = localRootsCache.containsKey(rootPath) ? (File) localRootsCache.get(rootPath) : SVNWCUtil.getWorkingCopyRoot(rootPath, true);
            localRootsCache.put(path, wcRoot);
            if (!rootsMap.containsKey(wcRoot)) {
                rootsMap.put(wcRoot, new ArrayList());
            }
            Collection wcPaths = (Collection) rootsMap.get(wcRoot);
View Full Code Here

    public static SVNURL translateCommitables(SVNCommitItem[] items, Map decodedPaths) throws SVNException {
        Map itemsMap = new SVNHashMap();
        for (int i = 0; i < items.length; i++) {
            SVNCommitItem item = items[i];
            if (itemsMap.containsKey(item.getURL())) {
                SVNCommitItem oldItem = (SVNCommitItem) itemsMap.get(item.getURL());
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_DUPLICATE_COMMIT_URL,
                        "Cannot commit both ''{0}'' and ''{1}'' as they refer to the same URL",
                        new Object[] {item.getFile(), oldItem.getFile()});
                SVNErrorManager.error(err, SVNLogType.WC);
View Full Code Here

        SVNURL baseURL = (SVNURL) urls.next();
        while (urls.hasNext()) {
            SVNURL url = (SVNURL) urls.next();
            baseURL = SVNURLUtil.getCommonURLAncestor(baseURL, url);
        }
        if (itemsMap.containsKey(baseURL)) {
            SVNCommitItem root = (SVNCommitItem) itemsMap.get(baseURL);
            if (root.getKind() != SVNNodeKind.DIR) {
                baseURL = baseURL.removePathTail();
            } else if (root.getKind() == SVNNodeKind.DIR
                    && (root.isAdded() || root.isDeleted() || root.isCopied() || root.isLocked())) {
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.