private SVNCopySource[] getCopySources(CopySource[] srcs, boolean copyAsChild) throws ClientException { if (srcs.length > 1 && !copyAsChild) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_MULTIPLE_SOURCES_DISALLOWED); SVNException ex = new SVNException(err); throwException(ex); } SVNCopySource[] sources = new SVNCopySource[srcs.length]; try { for (int i = 0; i < srcs.length; i++) { if (isURL(srcs[i].getPath())) { sources[i] = new SVNCopySource(JavaHLObjectFactory.getSVNRevision(srcs[i].getPegRevision()), JavaHLObjectFactory.getSVNRevision(srcs[i].getRevision()), SVNURL.parseURIEncoded(srcs[i].getPath())); } else { sources[i] = new SVNCopySource(JavaHLObjectFactory.getSVNRevision(srcs[i].getPegRevision()), JavaHLObjectFactory.getSVNRevision(srcs[i].getRevision()), new File(srcs[i].getPath()).getAbsoluteFile()); } } } catch (SVNException e) { throwException(e); } finally { resetLog(); } return sources; }
private SVNCopySource[] getCopySources(CopySource[] srcs, boolean copyAsChild) throws ClientException { if (srcs.length > 1 && !copyAsChild) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_MULTIPLE_SOURCES_DISALLOWED); SVNException ex = new SVNException(err); throwException(ex); } SVNCopySource[] sources = new SVNCopySource[srcs.length]; try { for (int i = 0; i < srcs.length; i++) { if (isURL(srcs[i].getPath())) { sources[i] = new SVNCopySource(JavaHLObjectFactory.getSVNRevision(srcs[i].getPegRevision()), JavaHLObjectFactory.getSVNRevision(srcs[i].getRevision()), SVNURL.parseURIEncoded(srcs[i].getPath())); } else { sources[i] = new SVNCopySource(JavaHLObjectFactory.getSVNRevision(srcs[i].getPegRevision()), JavaHLObjectFactory.getSVNRevision(srcs[i].getRevision()), new File(srcs[i].getPath()).getAbsoluteFile()); } } } catch (SVNException e) { throwException(e); } finally { resetLog(); } return sources; }
private SVNCopySource[] getCopySources(CopySource[] srcs, boolean copyAsChild) throws ClientException { if (srcs.length > 1 && !copyAsChild) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_MULTIPLE_SOURCES_DISALLOWED); SVNException ex = new SVNException(err); throwException(ex); } SVNCopySource[] sources = new SVNCopySource[srcs.length]; try { for (int i = 0; i < srcs.length; i++) { if (isURL(srcs[i].getPath())) { sources[i] = new SVNCopySource(JavaHLObjectFactory.getSVNRevision(srcs[i].getPegRevision()), JavaHLObjectFactory.getSVNRevision(srcs[i].getRevision()), SVNURL.parseURIEncoded(srcs[i].getPath())); } else { sources[i] = new SVNCopySource(JavaHLObjectFactory.getSVNRevision(srcs[i].getPegRevision()), JavaHLObjectFactory.getSVNRevision(srcs[i].getRevision()), new File(srcs[i].getPath()).getAbsoluteFile()); } } } catch (SVNException e) { throwException(e); } finally { resetLog(); } return sources; }