/** * Committs an addition of a local unversioned file or directory into * the repository. If the destination URL (<code>dstURL</code>) contains any * non-existent parent directories they will be automatically created by the * server. * * @param path a local unversioned file or directory to be imported * into the repository * @param dstURL a URL-string that represents a repository location * where the <code>path</code> will be imported * @param commitMessage a string to be a commit log message * @param recursive this flag is relevant only when the <code>path</code> is * a directory: if <span class="javakeyword">true</span> then the entire directory * tree will be imported including all child directories, otherwise * only items located in the directory itself * @return information on a new revision as the result * of the commit * @throws SVNException if one of the following is true: * <ul> * <li><code>dstURL</code> is invalid * <li>the path denoted by <code>dstURL</code> already * exists * <li><code>path</code> contains a reserved name - <i>'.svn'</i> * </ul> */ public SVNCommitInfo doImport(File path, SVNURL dstURL, String commitMessage, boolean recursive) throws SVNException { return doImport(path, dstURL, commitMessage, true, recursive); }
return doImport(path, dstURL, commitMessage, revisionProperties, useGlobalIgnores, ignoreUnknownNodeTypes, depth, true);
public void commitToSvn(SVNClientManager clientManager) throws SVNException { SVNCommitClient commitClient = clientManager.getCommitClient(); File fileToCheckin = new File("LocalDir/SampleFileFolder/SampleFile1"); boolean recursive = true; SVNCommitInfo importInfo = commitClient .doImport( fileToCheckin , SVNURL.parseURIDecoded("<path at which we want to check-in the file>"), "testing svn kit integration", recursive); System.out.println(importInfo.getNewRevision()); }
return doImport(path, dstURL, commitMessage, null, true, false, SVNDepth.fromRecurse(recursive));
return doImport(path, dstURL, commitMessage, null, true, true, SVNDepth.fromRecurse(recursive));
return doImport(path, dstURL, commitMessage, null, true, false, SVNDepth.fromRecurse(recursive));
return doImport(path, dstURL, commitMessage, null, useGlobalIgnores, false, SVNDepth.fromRecurse(recursive));
return doImport(path, dstURL, commitMessage, null, useGlobalIgnores, false, SVNDepth.fromRecurse(recursive));
return doImport(path, dstURL, commitMessage, null, useGlobalIgnores, true, SVNDepth.fromRecurse(recursive));
public void doImport(String path, String url, String message, boolean recurse) throws ClientException { SVNCommitClient commitClient = getSVNCommitClient(); try { commitClient.doImport(new File(path), SVNURL.parseURIEncoded(url), message, recurse); } catch (SVNException e) { throwException(e); } }
public void doImport(String path, String url, String message, int depth, boolean noIgnore, boolean ignoreUnknownNodeTypes, Map revprops) throws ClientException { SVNCommitClient commitClient = getSVNCommitClient(); try { commitClient.setCommitHandler(createCommitMessageHandler(false, true)); SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); commitClient.doImport(new File(path), SVNURL.parseURIEncoded(url), message, revisionProperties, !noIgnore, ignoreUnknownNodeTypes, JavaHLObjectFactory.getSVNDepth(depth)); } catch (SVNException e) { throwException(e); } finally { if (commitClient != null) { commitClient.setCommitHandler(null); } resetLog(); } }
public void doImport(String path, String url, String message, int depth, boolean noIgnore, boolean ignoreUnknownNodeTypes, Map revprops) throws ClientException { SVNCommitClient commitClient = getSVNCommitClient(); try { commitClient.setCommitHandler(createCommitMessageHandler(false, true)); SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); commitClient.doImport(new File(path), SVNURL.parseURIEncoded(url), message, revisionProperties, !noIgnore, ignoreUnknownNodeTypes, JavaHLObjectFactory.getSVNDepth(depth)); } catch (SVNException e) { throwException(e); } finally { if (commitClient != null) { commitClient.setCommitHandler(null); } resetLog(); } }
public void doImport(String path, String url, String message, int depth, boolean noIgnore, boolean ignoreUnknownNodeTypes, Map revprops) throws ClientException { SVNCommitClient commitClient = getSVNCommitClient(); try { commitClient.setCommitHandler(createCommitMessageHandler(false, true)); SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); commitClient.doImport(new File(path), SVNURL.parseURIEncoded(url), message, revisionProperties, !noIgnore, ignoreUnknownNodeTypes, JavaHLObjectFactory.getSVNDepth(depth)); } catch (SVNException e) { throwException(e); } finally { if (commitClient != null) { commitClient.setCommitHandler(null); } resetLog(); } }
commitClient.doImport(dto.getUpload(), SVNURL.parseURIEncoded(dto.getScmPath() + "/" + dto.getUploadFileName()), "From scmwebeditor -- add the file : " + dto.getUploadFileName(), null, false, false, SVNDepth.EMPTY); } catch (SVNAuthenticationException authexep) {
SVNCommitInfo info = client.doImport(src.getFile(), url.getURL(), getSVNEnvironment().getMessage(), getSVNEnvironment().getRevisionProperties(), !getSVNEnvironment().isNoIgnore(), getSVNEnvironment().isForce(), depth, !getSVNEnvironment().isNoAutoProps());
SVNCommitInfo info = client.doImport(src.getFile(), url.getURL(), getSVNEnvironment().getMessage(), getSVNEnvironment().getRevisionProperties(), !getSVNEnvironment().isNoIgnore(), getSVNEnvironment().isForce(), depth, !getSVNEnvironment().isNoAutoProps());