myCurrentFile = newFile; myPathsMap.put(myCurrentFile.getURL(), myCurrentFile.getPath());
myPathsMap.put(newFile.getURL(), newFile.getPath()); myFilesMap.put(path, newFile);
    public void addFile(String path, String copyPath, long copyRevision) throws SVNException {        path = PathUtil.encode(path);        // checkout parent collection.        DAVResource parentResource = (DAVResource) myDirsStack.peek();        if (parentResource.getWorkingURL() == null) {        	String filePath = PathUtil.append(parentResource.getURL(), PathUtil.tail(path));    		DAVResponse responce = DAVUtil.getResourceProperties(myConnection, filePath, null, DAVElement.STARTING_PROPERTIES, true);    		if (responce != null) {    			throw new SVNException("File '"  + filePath + "' already exists");     		}        }        checkoutResource(parentResource);        String wPath = parentResource.getWorkingURL();        // create child resource.        DAVResource newFile = new DAVResource(myCommitMediator, myConnection, path, -1);        newFile.setWorkingURL(PathUtil.append(wPath, PathUtil.tail(path)));        // put to have working URL to make PUT or PROPPATCH later (in closeFile())        myCurrentFile = newFile;        myPathsMap.put(myCurrentFile.getURL(), myCurrentFile.getPath());        if (copyPath != null) {	        copyPath = PathUtil.encode(copyPath);            copyPath = myRepository.getFullPath(copyPath);            DAVBaselineInfo info = DAVUtil.getBaselineInfo(myConnection, copyPath, copyRevision, false, false, null);            copyPath = PathUtil.append(info.baselineBase, info.baselinePath);                        // do "COPY" copyPath to parents working url ?            wPath = myLocation.getProtocol() + "://" + myLocation.getHost() + ":" + myLocation.getPort() +             	PathUtil.encode(newFile.getWorkingURL());            DAVStatus status = myConnection.doCopy(copyPath, wPath);            if (status.getResponseCode() != 201 && status.getResponseCode() != 204) {                throw new SVNException("COPY failed: " + status);            }        }            }