SVNkit无法创建SVNRepoitory
我正在尝试使用 SVNkit 在两个 svn url 上运行 diff。 问题是,当调用 diff.doDiff
时,我收到错误。
org.tmatesoft.svn.core.SVNException:svn:无法创建 SVNRepository 对象 'http://svn.codehaus.org/jruby /trunk/jruby/src/org/jruby/Finalizes.java' 在 org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:55) 在 org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:40) 在 org.tmatesoft.svn.core.io.SVNRepositoryFactory.create(SVNRepositoryFactory.java:199) 在 org.tmatesoft.svn.core.wc.DefaultSVNRepositoryPool.createRepository(DefaultSVNRepositoryPool.java:213) 在 org.tmatesoft.svn.core.wc.SVNClientManager.createRepository(SVNClientManager.java:242) 在 org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:231) 在 org.tmatesoft.svn.core.wc.SVNDiffClient.doDiffURLURL(SVNDiffClient.java:769) 在 org.tmatesoft.svn.core.wc.SVNDiffClient.doDiff(SVNDiffClient.java:310) 在 SVNTest.main(SVNTest.java:30)
我已经仔细检查了 URL(我可以在 TortoiseSVN 客户端中打开它们)。 有人能帮我知道发生了什么事吗? 我已经发布了我在下面运行的代码。
SVNClientManager manager = SVNClientManager.newInstance(SVNWCUtil.createDefaultOptions(false), user, pass);
SVNDiffClient diff = manager.getDiffClient();
//ISVNDiffStatusHandler diffStatus = new ISVNDiffStatusHandler();
try {
SVNURL oldURL = SVNURL.parseURIDecoded(url);
diff.doDiff(SVNURL.parseURIDecoded(url), SVNRevision.create(oldVersion), SVNURL.parseURIDecoded(url), SVNRevision.HEAD, false, false, System.out);
} catch (SVNException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
I am trying to run a diff on two svn urls using SVNkit. The problem is that I get the error when diff.doDiff
is called.
org.tmatesoft.svn.core.SVNException: svn: Unable to create
SVNRepository object for
'http://svn.codehaus.org/jruby/trunk/jruby/src/org/jruby/Finalizable.java'
at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:55)
at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:40)
at
org.tmatesoft.svn.core.io.SVNRepositoryFactory.create(SVNRepositoryFactory.java:199)
at
org.tmatesoft.svn.core.wc.DefaultSVNRepositoryPool.createRepository(DefaultSVNRepositoryPool.java:213)
at
org.tmatesoft.svn.core.wc.SVNClientManager.createRepository(SVNClientManager.java:242)
at
org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:231)
at
org.tmatesoft.svn.core.wc.SVNDiffClient.doDiffURLURL(SVNDiffClient.java:769)
at
org.tmatesoft.svn.core.wc.SVNDiffClient.doDiff(SVNDiffClient.java:310)
at SVNTest.main(SVNTest.java:30)
I have double checked the URLs (I can open them in TortoiseSVN client). Can anybody help me know what is going on? I have posted the code I am running below.
SVNClientManager manager = SVNClientManager.newInstance(SVNWCUtil.createDefaultOptions(false), user, pass);
SVNDiffClient diff = manager.getDiffClient();
//ISVNDiffStatusHandler diffStatus = new ISVNDiffStatusHandler();
try {
SVNURL oldURL = SVNURL.parseURIDecoded(url);
diff.doDiff(SVNURL.parseURIDecoded(url), SVNRevision.create(oldVersion), SVNURL.parseURIDecoded(url), SVNRevision.HEAD, false, false, System.out);
} catch (SVNException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你调用过下面的静态方法吗?
这需要在访问任何
http://
存储库和类似的存储库之前调用应该用于
svn://
存储库。have you called the following static method?
This needs to be called before accessing any
http://
repositories and the similarshould be used for
svn://
repositories.