2015-10-28 119 views
3

我想使用SVNKIT java API合并分支到trunk。SVN错误:svn:E200007:'org.tmatesoft.svn.core.wc2.SvnMerge'的跑步者

它的代码如下:

String branchURL = "<Branch URL>"; 

SVNURL branchSVNURL = SVNURL.parseURIDecoded(branchURL);//SVN Branch URL 

String WC_PATH= "<Some Path>";//This is the Working copy path which has the Trunk checked out 

File svnWorkingCopy = new File(WC_PATH); 

SVNDiffClient svnDiffClient;//This is initialized using SVNClientManager 

try{ 
     //doMerge(java.io.File path1, SVNRevision revision1, SVNURL url2, SVNRevision revision2, java.io.File dstPath, SVNDepth depth, boolean useAncestry, boolean force, boolean dryRun, boolean recordOnly) 
     svnDiffClient.doMerge(branchSVNURL, SVNRevision.HEAD,null,svnWorkingCopy,SVNDepth.INFINITY,false, false, false, false); 
    }catch(Exception e){ 
    e.printStackTrace(); 
    } 

运行这段代码引发以下错误:

org.tmatesoft.svn.core.SVNException: svn: E200007: Runner for 'org.tmatesoft.svn.core.wc2.SvnMerge' command have not been found; probably not yet implement in this API. 
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.wc2.SvnOperationFactory.getImplementation(SvnOperationFactory.java:1375) 
at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1224) 
at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294) 
at org.tmatesoft.svn.core.wc.SVNDiffClient.doMerge(SVNDiffClient.java:2389) 
at com.test.TestSVN.merge(TestSVN.java:109) 
at com.test.TestSVN.main(TestSVN.java:45) 

我跑这一段代码与SVNKIT版本1.7.111.8.10并得到相同的错误。

SVN命令行等同于上面提到的代码是

svn merge <branchurl> <WC_PATH> 

我们知道如果有什么需要做的事情来解决这个问题。

回答

1

通知例外消息:

Runner for 'org.tmatesoft.svn.core.wc2.SvnMerge' command have not been found; probably not yet implement in this API.

尝试改变另一SVN接口的客户端,`JavaHL(JNI)1.8.10(r1615264) ,支持SVN合并命令!这个对我有用!

0

在Jenkins使用Subversion plugin时,我有同样的错误。当我Google搜索时,我登陆了这里。

为了解决这个问题在詹金斯我做

Manage Jenkins -> Configure System -> Scroll down to the subversion settings -> select your subversion workspace version

例如

enter image description here

3

首先,检查你有没有安装subclipse,@ flm的帖子在哪里。 在您的Eclipse,去窗口 - >首选项 - >团队 - > SVN - > DIFF /合并

选择默认(Sublclipse)

enter image description here

1

我在Eclipse中有同样的错误与SVNKIT合并时和CollabNet客户端切换到JavaHL合并后工作正常。

请注意,您必须使用Subclipe wiki中描述的本地subversion与subclipe-> JavaHL库的匹配版本。例如svn 1.9.x => subclipe 1.12