Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you connect OpenGrok to a SVN repository?

Tags:

svn

opengrok

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&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> 
like image 348
Mathias F Avatar asked Apr 15 '10 23:04

Mathias F


1 Answers

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

like image 123
Gant Avatar answered Sep 27 '22 08:09

Gant