如何使用SVNKit在SVN中提交特定文件而不是整個目錄?使用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);
請發佈您當前使用的代碼來提交整個目錄。 – mstrap 2013-03-20 10:06:09