decodedPaths.put(PathUtil.decode(realPath), item);
decodedPaths.put(SVNEncodingUtil.uriDecode(realPath), item);
    public static String translateCommitables(SVNCommitItem[] items,            Map decodedPaths) throws SVNException {        Map itemsMap = new TreeMap();        for (int i = 0; i < items.length; i++) {            SVNCommitItem item = items[i];            if (itemsMap.containsKey(item.getURL())) {                SVNCommitItem oldItem = (SVNCommitItem) itemsMap.get(item                        .getURL());                SVNErrorManager.error("svn: Cannot commit both '"                        + item.getFile() + "' and '" + oldItem.getFile()                        + "' as they refer to the same URL");            }            itemsMap.put(item.getURL(), item);        }        Iterator urls = itemsMap.keySet().iterator();        String baseURL = (String) urls.next();        while (urls.hasNext()) {            String url = (String) urls.next();            baseURL = SVNPathUtil.getCommonURLAncestor(baseURL, url);        }        if (itemsMap.containsKey(baseURL)) {            SVNCommitItem root = (SVNCommitItem) itemsMap.get(baseURL);            if (root.getKind() != SVNNodeKind.DIR) {                baseURL = PathUtil.removeTail(baseURL);            } else if (root.getKind() == SVNNodeKind.DIR                    && (root.isAdded() || root.isDeleted() || root.isCopied() || root                            .isLocked())) {                baseURL = PathUtil.removeTail(baseURL);            }        }        urls = itemsMap.keySet().iterator();        while (urls.hasNext()) {            String url = (String) urls.next();            SVNCommitItem item = (SVNCommitItem) itemsMap.get(url);            String realPath = url.substring(baseURL.length());            if (realPath.startsWith("/")) {                realPath = PathUtil.removeLeadingSlash(realPath);            }            decodedPaths.put(PathUtil.decode(realPath), item);        }        return baseURL;    }