如何将 OpenGrok 连接到 SVN 存储库?
我能够使用此博客条目在 WinXP 上安装和使用 opengrok
http://theflashesofinsight.wordpress.com/2009/05/11/install-opengrok-on-windows/
我现在想要索引一个颠覆存储库。我检出源文件夹的存储库并可以搜索文件。然而,历史记录和注释的链接未激活。
我已经安装了 svn 并且索引目录没有给出警告或错误。 (没有安装SVN客户端时出现错误)
是否需要进行一些配置?我看到这个链接 http://blogs.oracle.com/trond/entry/using_subversion_with_opengrok 但它没有给我任何线索。
我使用了
java -Xmx1024m -jar opengrok.jar -W "C:\\OpenGrok\\data\\configuration.xml" -r on -P -S -v -s "C:\\OpenGrok\\source" -d "C:\\OpenGrok\\data"
它之后
java -Xmx1024m -jar opengrok.jar -R "C:\\OpenGrok\\data\\configuration.xml" -H
这是结果配置:
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_20" class="java.beans.XMLDecoder">
<object class="org.opensolaris.opengrok.configuration.Configuration">
<void property="dataRoot">
<string>C:\OpenGrok\data</string>
</void>
<void property="projects">
<void method="add">
<object class="org.opensolaris.opengrok.configuration.Project">
<void property="description">
<string>Configuration</string>
</void>
<void property="path">
<string>/Configuration</string>
</void>
</object>
</void>
<void method="add">
<object class="org.opensolaris.opengrok.configuration.Project">
<void property="description">
<string>test</string>
</void>
<void property="path">
<string>/test</string>
</void>
</object>
</void>
</void>
<void property="remoteScmSupported">
<boolean>true</boolean>
</void>
<void property="repositories">
<void method="add">
<object class="org.opensolaris.opengrok.history.RepositoryInfo">
<void property="datePattern">
<string>yyyy-MM-dd'T'HH:mm:ss.SSS'Z'</string>
</void>
<void property="directoryName">
<string>C:\OpenGrok\source\Configuration</string>
</void>
<void property="remote">
<boolean>true</boolean>
</void>
<void property="type">
<string>Subversion</string>
</void>
<void property="working">
<boolean>true</boolean>
</void>
</object>
</void>
</void>
<void property="sourceRoot">
<string>C:\OpenGrok\source</string>
</void>
<void property="verbose">
<boolean>true</boolean>
</void>
</object>
</java>
I was able to install and use opengrok on WinXP using this blog entry
http://theflashesofinsight.wordpress.com/2009/05/11/install-opengrok-on-windows/
I now want to index a subversion repository. I checked out a repository to the source folder and can search the files. However the links for history and annotate are not active.
I have svn installed and indexing the directory give no warnings or errors. (There was an error when I didnt have the SVN client installed)
Is there some configuration needed? I saw this link http://blogs.oracle.com/trond/entry/using_subversion_with_opengrok but it did not give me any clue.
I used
java -Xmx1024m -jar opengrok.jar -W "C:\\OpenGrok\\data\\configuration.xml" -r on -P -S -v -s "C:\\OpenGrok\\source" -d "C:\\OpenGrok\\data"
and after it
java -Xmx1024m -jar opengrok.jar -R "C:\\OpenGrok\\data\\configuration.xml" -H
This is the resulting config:
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_20" class="java.beans.XMLDecoder">
<object class="org.opensolaris.opengrok.configuration.Configuration">
<void property="dataRoot">
<string>C:\OpenGrok\data</string>
</void>
<void property="projects">
<void method="add">
<object class="org.opensolaris.opengrok.configuration.Project">
<void property="description">
<string>Configuration</string>
</void>
<void property="path">
<string>/Configuration</string>
</void>
</object>
</void>
<void method="add">
<object class="org.opensolaris.opengrok.configuration.Project">
<void property="description">
<string>test</string>
</void>
<void property="path">
<string>/test</string>
</void>
</object>
</void>
</void>
<void property="remoteScmSupported">
<boolean>true</boolean>
</void>
<void property="repositories">
<void method="add">
<object class="org.opensolaris.opengrok.history.RepositoryInfo">
<void property="datePattern">
<string>yyyy-MM-dd'T'HH:mm:ss.SSS'Z'</string>
</void>
<void property="directoryName">
<string>C:\OpenGrok\source\Configuration</string>
</void>
<void property="remote">
<boolean>true</boolean>
</void>
<void property="type">
<string>Subversion</string>
</void>
<void property="working">
<boolean>true</boolean>
</void>
</object>
</void>
</void>
<void property="sourceRoot">
<string>C:\OpenGrok\source</string>
</void>
<void property="verbose">
<boolean>true</boolean>
</void>
</object>
</java>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我曾经遇到过同样的问题。您需要确保 svn 包含您的 Web 服务器的 $PATH。否则,Web 应用程序将无法调用 svn,历史记录/注释链接将灰显。
相关帖子: http://opensolaris.org/jive/thread.jspa?messageID=416663
I once had the same problem. You need to make sure svn is include the $PATH of your web server. Otherwise, the web application won't be able to call svn and History/Annotate link would be grayed out.
Related post: http://opensolaris.org/jive/thread.jspa?messageID=416663