我想使用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.11和1.8.10並得到相同的錯誤。
SVN命令行等同於上面提到的代碼是
svn merge <branchurl> <WC_PATH>
我們知道如果有什麼需要做的事情來解決這個問題。