private void doCopy(SVNCopySource[] sources, File dst, boolean isMove, boolean makeParents, boolean failWhenDstExists, boolean pinExternals, Map<SvnTarget, List<SVNExternal>> externalsToPin) throws SVNException { if (sources.length > 1 && failWhenDstExists) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_MULTIPLE_SOURCES_DISALLOWED); SVNErrorManager.error(err, SVNLogType.DEFAULT); } sources = expandCopySources(sources); if (sources.length == 0) { return; } try { setupCopy(sources, new SVNPath(dst.getAbsolutePath(), false, false), isMove, makeParents, pinExternals, externalsToPin, null, null, getCommitHandler(), getCommitParameters(), getExternalsHandler()); } catch (SVNException e) { SVNErrorCode err = e.getErrorMessage().getErrorCode(); if (!failWhenDstExists && sources.length == 1 && (err == SVNErrorCode.ENTRY_EXISTS || err == SVNErrorCode.FS_ALREADY_EXISTS)) { SVNCopySource source = sources[0]; String baseName = source.getName(); if (source.isURL()) { baseName = SVNEncodingUtil.uriDecode(baseName); } try { setupCopy(sources, new SVNPath(new File(dst, baseName).getAbsolutePath(), false, false), isMove, makeParents, pinExternals, externalsToPin, null, null, getCommitHandler(), getCommitParameters(), getExternalsHandler()); } catch (SVNException second) { throw second; } return; } throw e; } }
SVNErrorManager.error(err, SVNLogType.WC); String baseName = source.getName(); if (srcIsURL && !dstIsURL) { baseName = SVNEncodingUtil.uriDecode(baseName);
SVNErrorManager.error(err, SVNLogType.WC); String baseName = source.getName(); if (srcIsURL && !dstIsURL) { baseName = SVNEncodingUtil.uriDecode(baseName);
SVNErrorManager.error(err, SVNLogType.WC); String baseName = source.getName(); if (srcIsURL && !dstIsURL) { baseName = SVNEncodingUtil.uriDecode(baseName);
if (!failWhenDstExists && sources.length == 1 && (err == SVNErrorCode.ENTRY_EXISTS || err == SVNErrorCode.FS_ALREADY_EXISTS)) { SVNCopySource source = sources[0]; String baseName = source.getName(); if (source.isURL()) { baseName = SVNEncodingUtil.uriDecode(baseName);
if (!failWhenDstExists && sources.length == 1 && (err == SVNErrorCode.ENTRY_EXISTS || err == SVNErrorCode.FS_ALREADY_EXISTS)) { SVNCopySource source = sources[0]; String baseName = source.getName(); if (source.isURL()) { baseName = SVNEncodingUtil.uriDecode(baseName);
public SVNCommitInfo doCopy(SVNCopySource[] sources, SVNURL dst, boolean isMove, boolean makeParents, boolean failWhenDstExists, boolean pinExternals, Map<SvnTarget, List<SVNExternal>> externalsToPin, String commitMessage, SVNProperties revisionProperties) throws SVNException { if (sources.length > 1 && failWhenDstExists) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_MULTIPLE_SOURCES_DISALLOWED); SVNErrorManager.error(err, SVNLogType.DEFAULT); } sources = expandCopySources(sources); if (sources.length == 0) { return SVNCommitInfo.NULL; } try { return setupCopy(sources, new SVNPath(dst.toString(), false, false), isMove, makeParents, pinExternals, externalsToPin, commitMessage, revisionProperties, getCommitHandler(), getCommitParameters(), getExternalsHandler()); } catch (SVNException e) { SVNErrorCode err = e.getErrorMessage().getErrorCode(); if (!failWhenDstExists && sources.length == 1 && (err == SVNErrorCode.ENTRY_EXISTS || err == SVNErrorCode.FS_ALREADY_EXISTS)) { SVNCopySource source = sources[0]; String baseName = source.getName(); if (!source.isURL()) { baseName = SVNEncodingUtil.uriEncode(baseName); } try { return setupCopy(sources, new SVNPath(dst.appendPath(baseName, true).toString(), false, false), isMove, makeParents, pinExternals, externalsToPin, commitMessage, revisionProperties, getCommitHandler(), getCommitParameters(), getExternalsHandler()); } catch (SVNException second) { throw second; } } throw e; } }
if (!failWhenDstExists && sources.length == 1 && (err == SVNErrorCode.ENTRY_EXISTS || err == SVNErrorCode.FS_ALREADY_EXISTS)) { SVNCopySource source = sources[0]; String baseName = source.getName(); if (!source.isURL()) { baseName = SVNEncodingUtil.uriEncode(baseName);
if (!failWhenDstExists && sources.length == 1 && (err == SVNErrorCode.ENTRY_EXISTS || err == SVNErrorCode.FS_ALREADY_EXISTS)) { SVNCopySource source = sources[0]; String baseName = source.getName(); if (!source.isURL()) { baseName = SVNEncodingUtil.uriEncode(baseName);