如何将 OpenGrok 连接到 SVN 存储库?

发布于 2024-08-28 17:14:26 字数 3104 浏览 2 评论 0原文

我能够使用此博客条目在 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&apos;T&apos;HH:mm:ss.SSS&apos;Z&apos;</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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乖乖公主 2024-09-04 17:14:26

我曾经遇到过同样的问题。您需要确保 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文