wcAccess.getTargetName(), true); if (entry == null || entry.isHidden()) { SVNErrorManager.error("svn: '" + entry.getName()
wcAccess.getTargetName(), false); if (entry == null) { SVNErrorManager.error("svn: '" + paths[i]
    public void doUnlock(File[] paths, boolean breakLock) throws SVNException {        Map entriesMap = new HashMap();        for (int i = 0; i < paths.length; i++) {            SVNWCAccess wcAccess = createWCAccess(paths[i]);            try {                wcAccess.open(true, false);                SVNEntry entry = wcAccess.getAnchor().getEntries().getEntry(                        wcAccess.getTargetName(), true);                if (entry == null || entry.isHidden()) {                    SVNErrorManager.error("svn: '" + entry.getName()                            + "' is not under version control");                }                if (entry.getURL() == null) {                    SVNErrorManager.error("svn: '" + entry.getName()                            + "' has no URL");                }                String lockToken = entry.getLockToken();                if (!breakLock && lockToken == null) {                    SVNErrorManager.error("svn: '" + entry.getName()                            + "' is not locked in this working copy");                }                entriesMap.put(entry.getURL(),                        new LockInfo(paths[i], lockToken));                wcAccess.getAnchor().getEntries().close();            } finally {                wcAccess.close(true);            }        }        for (Iterator urls = entriesMap.keySet().iterator(); urls.hasNext();) {            String url = (String) urls.next();            LockInfo info = (LockInfo) entriesMap.get(url);            SVNWCAccess wcAccess = createWCAccess(info.myFile);            SVNRepository repos = createRepository(url);            SVNLock lock = null;            boolean removeLock;            try {                repos.removeLock("", info.myToken, breakLock);                removeLock = true;            } catch (SVNException error) {                // remove lock if error is owner_mismatch.                removeLock = true;            }            if (!removeLock) {                handleEvent(SVNEventFactory.createLockEvent(wcAccess, wcAccess                        .getTargetName(), SVNEventAction.UNLOCK_FAILED, null,                        "unlock failed"), ISVNEventHandler.UNKNOWN);                continue;            }            try {                wcAccess.open(true, false);                SVNEntry entry = wcAccess.getAnchor().getEntries().getEntry(                        wcAccess.getTargetName(), true);                entry.setLockToken(null);                entry.setLockComment(null);                entry.setLockOwner(null);                entry.setLockCreationDate(null);                wcAccess.getAnchor().getEntries().save(true);                wcAccess.getAnchor().getEntries().close();                if (wcAccess.getAnchor().getProperties(entry.getName(), false).getPropertyValue(SVNProperty.NEEDS_LOCK) != null) {                    SVNFileUtil.setReadonly(wcAccess.getAnchor().getFile(entry.getName()), true);                }                handleEvent(SVNEventFactory.createLockEvent(wcAccess, wcAccess                        .getTargetName(), SVNEventAction.UNLOCKED, lock, null),                        ISVNEventHandler.UNKNOWN);            } catch (SVNException e) {                handleEvent(SVNEventFactory.createLockEvent(wcAccess, wcAccess                        .getTargetName(), SVNEventAction.UNLOCK_FAILED, lock, e                        .getMessage()), ISVNEventHandler.UNKNOWN);            } finally {                wcAccess.close(true);            }        }    }