err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_ALREADY_EXISTS, "Path ''{0}'' already exits", newDir.getURL());
err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_ALREADY_EXISTS, "Path ''{0}'' already exists", newDir.getURL());
    public void addDir(String path, String copyPath, long copyRevision) throws SVNException {        path = SVNEncodingUtil.uriEncode(path);        DAVResource parentResource = (DAVResource) myDirsStack.peek();        checkoutResource(parentResource, true);        String wPath = parentResource.getWorkingURL();        DAVResource newDir = new DAVResource(myCommitMediator, myConnection, path, -1, copyPath != null);        newDir.setWorkingURL(SVNPathUtil.append(wPath, SVNPathUtil.tail(path)));        myDirsStack.push(newDir);        myPathsMap.put(newDir.getURL(), path);        if (copyPath != null) {            // convert to full path?            copyPath = myRepository.getFullPath(copyPath);            copyPath = SVNEncodingUtil.uriEncode(copyPath);            DAVBaselineInfo info = DAVUtil.getBaselineInfo(myConnection, myRepository, copyPath, copyRevision, false, false, null);            copyPath = SVNPathUtil.append(info.baselineBase, info.baselinePath);            // full url.            wPath = myLocation.getProtocol() + "://" + myLocation.getHost() + ":" + myLocation.getPort() +            	newDir.getWorkingURL();            myConnection.doCopy(copyPath, wPath, 1);        } else {            try {                myConnection.doMakeCollection(newDir.getWorkingURL());            } catch (SVNException e) {                // check if dir already exists.                if (!e.getErrorMessage().getErrorCode().isAuthentication() &&                         e.getErrorMessage().getErrorCode() != SVNErrorCode.CANCELLED) {                    SVNErrorMessage err = null;                    try {                        DAVBaselineInfo info = DAVUtil.getBaselineInfo(myConnection, myRepository, newDir.getURL(), -1, false, false, null);                        if (info != null) {                            err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_ALREADY_EXISTS, "Path ''{0}'' already exits", newDir.getURL());                        }                    } catch (SVNException inner) {                    }                    if (err != null) {                        SVNErrorManager.error(err);                    }                }                throw e;            }        }    }