這裏是我的代碼使用
public static SVNCommitInfo addDirectoryContentToSubversion(final String repositoryURL, final String subVersionedDirectory, final String userName, final String hashedPassword, final String commitMessage) throws SVNException {
final SVNClientManager cm = SVNClientManager.newInstance(new DefaultSVNOptions(), userName, hashedPassword);
cm.getCommitClient().doImport(new File(subVersionedDirectory), SVNURL.parseURIEncoded(repositoryURL), "<import> " + commitMessage, null, false, true, SVNDepth.fromRecurse(true));
return cm.getCommitClient().doCommit(new File[]{new File(subVersionedDirectory)}, false, "<commit> " + commitMessage, null, null, false, true, SVNDepth.INFINITY);
}
我需要一個答案這個問題太... – Ofear 2012-07-30 13:41:46
可以很容易地檢查,是的,SVNKit提交目錄指定遞歸如果你通過SVNDepth.INFINITY它。 – 2012-08-08 10:10:04