2015-10-28 107 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