レガシービルドシステムのファイルを含むディレクトリがあります。このビルドシステムのタイムラインをSVNリポジトリに再作成したいと思います。
そのためには、各ビルドを取得し、そのすべてのファイルを抽出し、適切なディレクトリ構造に配置し、ディレクトリ構造全体をsvnにコミットし、ビルドごとにタグを作成する必要があります(簡単に識別できるようにするため)。今のところ、そのシステムからファイルを取得してディレクトリ構造に配置することができ、SVNKitを使用してそのディレクトリ全体をSVNに配置しようとしています(同期システム全体がJavaコードを使用するものであるため)。
だから、私がすることは
- を使用してすべての新しいファイルをsvnに追加する
SVNWCClient.doAdd(main.workDirectory, true, false, false, SVNDepth.INFINITY, false, false /* we only add files below this path */)
- 次に、を使用してディレクトリ全体をコミットします
SVNCommitClient.doCommit(changedFiles, false, null, commitProps, null, false, true, SVNDepth.INFINITY)
残念ながら、それはうまく機能しません...
実際、これらのメソッドを呼び出そうとするたびに、
Exception in thread "main" org.tmatesoft.svn.core.SVNException: svn: Commit failed (details follow):
svn: 'E:\JavaWorkspace\workDirectory\subpath\deep\below\initial\path' is not under version control
and is not part of the commit,
yet its child is part of the commit
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:85)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:69)
at org.tmatesoft.svn.core.wc.SVNCommitClient.doCollectCommitItems(SVNCommitClient.java:1236)
at org.tmatesoft.svn.core.wc.SVNCommitClient.doCommit(SVNCommitClient.java:825)
at com.perigee.svnsync.SvnExecutor.commit(SvnExecutor.java:229)
at com.perigee.svnsync.SvnSynchronizer.examineRelease(SvnSynchronizer.java:40)
Caused by: org.tmatesoft.svn.core.SVNException: svn: 'E:\JavaWorkspace\workDirectory\subpath\deep\below\initial\path' is not under version control
and is not part of the commit,
yet its child is part of the commit
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
at org.tmatesoft.svn.core.internal.wc.SVNCommitUtil.harvestCommitables(SVNCommitUtil.java:546)
at org.tmatesoft.svn.core.wc.SVNCommitClient.doCollectCommitItems(SVNCommitClient.java:1208)
TortoiseSVNを使用してこのフォルダーを見ると、SVNに追加するのは完全に「通常の」フォルダーのように見えることに注意してください...さらに、TortoiseSVnを使用してルートディレクトリとそのすべての子を最小の問題なしでコミットできます。それで、それは私がそれを機能させるために私のコードに変更することができる/すべきものですか?