如何使用 SVNKit 在 SVN 中提交特定文件而不是整个目录?
提交整个目录的代码:
ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager((String) session.getAttribute("USERNAME"), (String) session.getAttribute("PASSWORD"));
repository.setAuthenticationManager(authManager);
SVNClientManager ourClientManager = SVNClientManager.newInstance(null,repository.getAuthenticationManager());
SVNUpdateClient updateClient = ourClientManager.getUpdateClient();
updateClient.doUpdate(wcDir, SVNRevision.HEAD, SVNDepth.INFINITY, false, false);
ourClientManager.getWCClient().doInfo(wcDir, SVNRevision.HEAD);
SVNCommitInfo s1=ourClientManager.getCommitClient().doCommit(new File[] {wcDir}, true, "From Code", svnProperties.getRegularProperties(), null, true, false, SVNDepth.INFINITY);