if (remotePath.startsWith(relativePath)) {
if (remotePath.equals(relativePath) || remotePath.startsWith(relativePath + "/")) {
    public Map completeStatus(Map statuses, String path, boolean descend) {        // iterate all paths,        // move matched to a special array        String relativePath = path.substring(myRootPath.length());        relativePath = PathUtil.removeLeadingSlash(relativePath);                Collection remoteMatches = new LinkedList();        for(Iterator remotePaths = myRemoteStatuses.keySet().iterator(); remotePaths.hasNext();) {            String remotePath = (String) remotePaths.next();            if (remotePath.startsWith(relativePath)) {                String name = remotePath.substring(relativePath.length());                name = PathUtil.removeLeadingSlash(name);                if (name.indexOf('/') < 0) {                    // it is a direct child of path, add only if there is a status or nothing.                    if ((statuses.containsKey(name) && statuses.get(name) != null) || !statuses.containsKey(name)) {                        remoteMatches.add(remotePath);                    }                 } else if (descend) {                    // check that it is not child of existing direct child.                    String head = PathUtil.head(name);                    if (!statuses.containsKey(head)) {                        remoteMatches.add(remotePath);                    }                }            }        }        DebugLog.log("COMPLETING STATUS FOR  " + path + " : " + statuses.keySet());        DebugLog.log("REMOTE MATCHED ENTRIES " + remoteMatches);        for(Iterator remotePaths = remoteMatches.iterator(); remotePaths.hasNext();) {            String remotePath = (String) remotePaths.next();            String name = remotePath.substring(relativePath.length());            name = PathUtil.removeLeadingSlash(name);            RemoteSVNStatus remoteStatus = (RemoteSVNStatus) myRemoteStatuses.remove(remotePath);            if (remoteStatus == null) {                continue;            }            SVNStatus svnStatus = (SVNStatus) statuses.get(name);            if (svnStatus != null) {                svnStatus.setRemoteStatus(remoteStatus.myRevision, remoteStatus.myPropertiesStatus, remoteStatus.myContentsStatus);            } else {                svnStatus = new SVNStatus(PathUtil.removeLeadingSlash(PathUtil.append(path, name)), 0, 0, -1, -1,                         remoteStatus.myRevision, remoteStatus.myContentsStatus, remoteStatus.myPropertiesStatus,                         remoteStatus.isAddedWithHistory, false, remoteStatus.isDirectory, null);                statuses.put(name, svnStatus);            }        }        return statuses;    }