質問編集履歴

2

ディレクトリを抽象化

2015/12/21 02:32

投稿

javabigineer
javabigineer

スコア87

test CHANGED
File without changes
test CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  以下のようにソースコードを組みましたが、エラーが発生しています。
12
12
 
13
- org.tmatesoft.svn.core.SVNException: svn: E155007: 'C:\kuro\work\X20L11R01' is not a working copy
13
+ org.tmatesoft.svn.core.SVNException: svn: E155007: 'ディレクトリ' is not a working copy
14
14
 
15
15
 
16
16
 

1

ソースコードの追加

2015/12/21 02:32

投稿

javabigineer
javabigineer

スコア87

test CHANGED
File without changes
test CHANGED
@@ -3,3 +3,55 @@
3
3
  SVNKitにおいて、SVNにコミットする際は、リポジトリをチェックアウトしてそのワーキングコピーからファイルまたはフォルダをコミットしなければならないでしょうか?
4
4
 
5
5
  チェックアウトせずに、ローカルファイルを指定URLに登録する処理は行えないのでしょうか?
6
+
7
+
8
+
9
+ 追記
10
+
11
+ 以下のようにソースコードを組みましたが、エラーが発生しています。
12
+
13
+ org.tmatesoft.svn.core.SVNException: svn: E155007: 'C:\kuro\work\X20L11R01' is not a working copy
14
+
15
+
16
+
17
+ 【ソース】
18
+
19
+ // SVNKitの初期化
20
+
21
+ DAVRepositoryFactory.setup();
22
+
23
+ SVNURL url = SVNURL.parseURIDecoded(svnroot);
24
+
25
+ SVNRepository repos = SVNRepositoryFactory.create(url);
26
+
27
+ if (svnuser != null) {
28
+
29
+ ISVNAuthenticationManager authManager = SVNWCUtil
30
+
31
+ .createDefaultAuthenticationManager(svnuser,svnpass == null ? "" : svnpass);
32
+
33
+ repos.setAuthenticationManager(authManager);
34
+
35
+ }
36
+
37
+ //認証済レポジトリオブジェクトを取得
38
+
39
+ SVNRepository repository = com.getRepos(svnroot,svnuser,svnpass);
40
+
41
+ SVNClientManager manager = SVNClientManager.newInstance(
42
+
43
+ SVNWCUtil.createDefaultOptions(true),svnuser,svnpass );
44
+
45
+
46
+
47
+ manager.getCommitClient().doCommit( new File[]{new File(destpath)},
48
+
49
+ false,
50
+
51
+ "コメント内容",
52
+
53
+ false,
54
+
55
+ true
56
+
57
+ );