SVN错误:svn:E200007:' org.tmatesoft.svn.core.wc2.SvnMerge'

时间:2015-10-28 22:39:12

标签: java svn svnkit

我正在尝试使用SVNKIT java API将分支合并到主干。

它的代码如下:

viewDidLoad

运行此代码会引发以下错误:

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();
   }

我使用SVNKIT版本 1.7.11 1.8.10 运行这段代码并得到了同样的错误。

上述代码的SVN命令行等效于

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)

请知道是否需要采取任何措施来解决此问题。

5 个答案:

答案 0 :(得分:7)

首先,检查你是否安装了subclipse,@ flm post在哪里。 在Eclipse中,转到Windows - &gt;偏好 - &gt;团队 - &gt; SVN - &gt; DIFF /合并

选择默认(Sublclipse)

enter image description here

答案 1 :(得分:1)

通知异常消息:

  

'org.tmatesoft.svn.core.wc2.SvnMerge'命令的运行器尚未   发现;可能尚未在此API中实现。

尝试更改另一个SVN接口客户端,`JavaHL(JNI)1.8.10(r1615264) ,支持svn merge命令!它对我有用!

答案 2 :(得分:1)

你在运行Eclipse吗? 添加此软件存储库http://subclipse.tigris.org/update_1.12.x 并安装一切。

答案 3 :(得分:1)

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

请注意,必须使用sublipe wiki中描述的本机subversion与subclipe-&gt; JavaHL库的匹配版本。例如svn 1.9.x =&gt;亚临时1.12

答案 4 :(得分:0)

使用Subversion plugin时,我在Jenkins中遇到了同样的错误。当我用Google搜索时,我降落在这里。

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

  

管理Jenkins - &gt;配置系统 - &gt;向下滚动到subversion设置 - &gt;选择您的subversion工作区版本

e.g。

enter image description here

相关问题