} else { locks = null;
	public long commitPaths(List paths, String message, boolean keepLocks, ISVNProgressViewer progressViewer) throws SVNException {		long start = System.currentTimeMillis();		try {			final Set modified = new HashSet();			for (Iterator it = paths.iterator(); it.hasNext();) {				final String path = (String)it.next();                ISVNEntry entry = locateEntry(path);				modified.add(entry);			}			if (message == null || modified.isEmpty()) {				DebugLog.log("NOTHING TO COMMIT");				return -1;			}			String root = getCommitRoot((String[])paths.toArray(new String[paths.size()]));			ISVNEntry rootEntry = locateEntry(root);			if (rootEntry == null || rootEntry.getPropertyValue(SVNProperty.URL) == null) {				throw new SVNException(root + " does not contain working copy files");			}			DebugLog.log("COMMIT MESSAGE: " + message);			Map tree = new HashMap();            Map locks = new HashMap();			String url = SVNCommitUtil.buildCommitTree(modified, tree, locks);			for (Iterator treePaths = tree.keySet().iterator(); treePaths.hasNext();) {				String treePath = (String)treePaths.next();				if (tree.get(treePath) != null) {					DebugLog.log("TREE ENTRY : " + treePath + " : " + ((ISVNEntry)tree.get(treePath)).getPath());				}				else {					DebugLog.log("TREE ENTRY : " + treePath + " : null");				}			}			DebugLog.log("COMMIT ROOT RECALCULATED: " + url);			DebugLog.log("COMMIT PREPARATIONS TOOK: " + (System.currentTimeMillis() - start) + " ms.");			SVNRepositoryLocation location = SVNRepositoryLocation.parseURL(url);			SVNRepository repository = SVNRepositoryFactory.create(location);			repository.setCredentialsProvider(getCredentialsProvider());            String host = location.getProtocol() + "://" + location.getHost() + ":" + location.getPort();            String rootURL = PathUtil.append(host, repository.getRepositoryRoot());                        if (!locks.isEmpty()) {                Map transaltedLocks = new HashMap();                for(Iterator lockedPaths = locks.keySet().iterator(); lockedPaths.hasNext();) {                    String lockedPath = (String) lockedPaths.next();                    String relativePath = lockedPath.substring(rootURL.length());                    if (!relativePath.startsWith("/")) {                        relativePath = "/" + relativePath;                    }                    transaltedLocks.put(relativePath, locks.get(lockedPath));                }                locks = transaltedLocks;            }            DebugLog.log("LOCKS ready for commit: " + locks);			ISVNEditor editor = repository.getCommitEditor(message, locks, keepLocks, new SVNWorkspaceMediatorAdapter(getRoot(), tree));			SVNCommitInfo info;			try {				SVNCommitUtil.doCommit("", rootURL, tree, editor, this, progressViewer);				info = editor.closeEdit();			}			catch (SVNException e) {				DebugLog.error("error: " + e.getMessage());				if (e.getErrors() != null) {					for (int i = 0; i < e.getErrors().length; i++) {						SVNError error = e.getErrors()[i];						if (error != null) {							DebugLog.error(error.toString());						}					}				}				try {					editor.abortEdit();				}				catch (SVNException inner) {				}				throw e;			}			catch (Throwable th) {				throw new SVNException(th);			}			DebugLog.log("COMMIT TOOK: " + (System.currentTimeMillis() - start) + " ms.");            if (!myIsCopyCommit) {    			start = System.currentTimeMillis();    			SVNCommitUtil.updateWorkingCopy(info, rootEntry.getPropertyValue(SVNProperty.UUID), tree, this);        			sleepForTimestamp();    			DebugLog.log("POST COMMIT ACTIONS TOOK: " + (System.currentTimeMillis() - start) + " ms.");            }			return info != null ? info.getNewRevision() : -1;		}		finally {            myIsCopyCommit = false;			getRoot().dispose();		}	}