Examples of SVNHashSet


Examples of org.tmatesoft.svn.core.internal.util.SVNHashSet

    public static boolean propNeedsTranslation(String propertyName) {
        return SVNProperty.isSVNProperty(propertyName);
    }

    private static Collection getKeywords(String value) {
        Collection keywords = new SVNHashSet();
        if (value == null || "".equals(value.trim())) {
            return keywords;
        }
        for (StringTokenizer tokens = new StringTokenizer(value, " \t\n\r"); tokens.hasMoreTokens();) {
            keywords.add(tokens.nextToken().toLowerCase());
        }
        return keywords;
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.SVNHashSet

    public void addIncompleteEntry(String path) {
        if (!myIsEnableIncompleteTrick) {
            return;
        }
        if (myIncompleteEntries == null) {
            myIncompleteEntries = new SVNHashSet();
        }
        myIncompleteEntries.add(path);
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.SVNHashSet

     * @param lockMessage an optional lock comment
     * @throws SVNException
     * @see #doLock(File[],boolean,String)
     */
    public void doLock(SVNURL[] urls, boolean stealLock, String lockMessage) throws SVNException {
        Collection paths = new SVNHashSet();
        SVNURL topURL = SVNURLUtil.condenceURLs(urls, paths, false);
        if (paths.isEmpty()) {
            paths.add("");
        }
        Map pathsToRevisions = new SVNHashMap();
        for (Iterator p = paths.iterator(); p.hasNext();) {
            String path = (String) p.next();
            path = SVNEncodingUtil.uriDecode(path);
            pathsToRevisions.put(path, null);
        }
        checkCancelled();
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.SVNHashSet

     *                  unlocked - that is "broken"
     * @throws SVNException
     * @see #doUnlock(File[],boolean)
     */
    public void doUnlock(SVNURL[] urls, boolean breakLock) throws SVNException {
        Collection paths = new SVNHashSet();
        SVNURL topURL = SVNURLUtil.condenceURLs(urls, paths, false);
        if (paths.isEmpty()) {
            paths.add("");
        }
        Map pathsToTokens = new SVNHashMap();
        for (Iterator p = paths.iterator(); p.hasNext();) {
            String path = (String) p.next();
            path = SVNEncodingUtil.uriDecode(path);
            pathsToTokens.put(path, null);
        }

View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.SVNHashSet

                    wcRevision : pegRevision, revision, depth, handler);
            return;
        }
        Collection changelistsSet = null;
        if (changeLists != null) {
            changelistsSet = new SVNHashSet();
            for (Iterator changeListsIter = changeLists.iterator(); changeListsIter.hasNext();) {
                String changeList = (String) changeListsIter.next();
                changelistsSet.add(changeList);
            }
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.SVNHashSet

        } finally {
            wcAccess.close();
        }
       
        if (!isIgnoreExternals() && info != null) {
            Collection processedDirs = new SVNHashSet();
            Map externals = info.getOldExternals();
            // update both old and new externals.
            for (Iterator paths = externals.keySet().iterator(); paths.hasNext();) {
                String path = (String) paths.next();
                String value = (String) externals.get(path);
                if (value == null) {
                    continue;
                }

                SVNExternal[] externalDefs = SVNExternal.parseExternals("", value);
                for (int i = 0; i < externalDefs.length; i++) {
                    String externalPath = externalDefs[i].getPath();
                    File externalDir = new Resource(info.getAnchor().getRoot(), SVNPathUtil.append(path, externalPath));
                    if (processedDirs.add(externalDir)) {
                        //if externalDir is an empty unversioned dir SVNFileType won't help us to avoid
                      //getting in an infinite loop
                      try {
                          wcAccess.open(externalDir, false, 0);
                        } catch (SVNException svne) {
                          if (svne.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_DIRECTORY) {
                            continue;
                          }
                          throw svne;
                        } finally {
                          wcAccess.close();
                        }

                        try {
                          doSetWCFormat(externalDir, format);
                        } catch (SVNException e) {
                          if (e.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_DIRECTORY) {
                            continue;
                          }
                          throw e;
                        }
                    }
                }
            }
           
            externals = info.getNewExternals();
            for (Iterator paths = externals.keySet().iterator(); paths.hasNext();) {
                String path = (String) paths.next();
                String value = (String) externals.get(path);
                SVNExternal[] externalDefs = SVNExternal.parseExternals("", value);
                for (int i = 0; i < externalDefs.length; i++) {
                    String externalPath = externalDefs[i].getPath();
                    File externalDir = new Resource(info.getAnchor().getRoot(), SVNPathUtil.append(path, externalPath));
                    if (processedDirs.add(externalDir)) {
                        //if externalDir is an empty unversioned dir SVNFileType won't help us to avoid
                        //getting in an infinite loop
                        try {
                            wcAccess.open(externalDir, false, 0);
                        } catch (SVNException svne) {
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.SVNHashSet

                lockInfo.put(entry.getSVNURL(), new LockInfo(file, stealLock ? null : entry.getLockToken()));
            }
        }
        checkCancelled();
        SVNURL[] urls = (SVNURL[]) lockInfo.keySet().toArray(new SVNURL[lockInfo.size()]);
        Collection urlPaths = new SVNHashSet();
        final SVNURL topURL = SVNURLUtil.condenceURLs(urls, urlPaths, false);
        if (urlPaths.isEmpty()) {
            urlPaths.add("");
        }
        if (topURL == null) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNSUPPORTED_FEATURE, "Unable to lock/unlock across multiple repositories");
            SVNErrorManager.error(err, SVNLogType.WC);
        }
        // prepare Map for SVNRepository (decoded path : revision/lock token).
        for (Iterator encodedPaths = urlPaths.iterator(); encodedPaths.hasNext();) {
            String encodedPath = (String) encodedPaths.next();
            // get LockInfo for it.
            SVNURL fullURL = topURL.appendPath(encodedPath, true);
            LockInfo info = (LockInfo) lockInfo.get(fullURL);
            encodedPath = SVNEncodingUtil.uriDecode(encodedPath);
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.SVNHashSet

    }
   
    public static Collection getIgnorePatterns(SVNAdminArea dir, Collection globalIgnores) throws SVNException {
        String localIgnores = dir.getProperties("").getStringPropertyValue(SVNProperty.IGNORE);
        if (localIgnores != null) {
            Collection patterns = new SVNHashSet();
            patterns.addAll(globalIgnores);
            for(StringTokenizer tokens = new StringTokenizer(localIgnores, "\r\n"); tokens.hasMoreTokens();) {
                String token = tokens.nextToken().trim();
                if (token.length() > 0) {
                    patterns.add(token);
                }
            }
            return patterns;
        }
        return globalIgnores;
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.SVNHashSet

   
    public static Collection getGlobalIgnores(ISVNOptions options) {
        if (options != null) {
            String[] ignores = options.getIgnorePatterns();
            if (ignores != null) {
                Collection patterns = new SVNHashSet();
                for (int i = 0; i < ignores.length; i++) {
                    patterns.add(ignores[i]);
                }
                return patterns;
            }
        }
        return Collections.EMPTY_SET;
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.util.SVNHashSet

    protected File createTempFile(SVNAdminArea dir, String name) throws SVNException {
        if (dir != null && dir.isLocked()) {
            File tmpFile = dir.getBaseFile(name, true);
            if (myTempFiles == null) {
                myTempFiles = new SVNHashSet();
            }
            myTempFiles.add(tmpFile);
            return tmpFile;
        }
        return SVNFileUtil.createUniqueFile(getTempDirectory(), ".diff", ".tmp", myIsUseGlobalTmp);
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.