WebSVN

Mar. 8th, 2007 05:37 pm
ibneko: (Default)
[personal profile] ibneko
I've been looking around for various web "front ends" for svn - essentially allowing comfortable browsing of an svn repository. The catch, however, is it must support remote repositories. As in, accessed through http:// or https://. Most, like Trac and ViewVC (was ViewCVS) either are working on handling it, or don't handle it at all.

So WebSVN [http://websvn.tigris.org/] handles it. And runs in PHP. That is good. (Trac and ViewVC are python based, a bit more of a hassle to install, at least for me.)

"XML error: no element found (3) at line 3 column 0 byte 45"

This error is due to a custom certificate. If you hit this, you'll need to find some way to tell svn to accept that certificate. Since my certificate was signed by CACert, all I had to do with add their root file to the svn config:
(in ~/.subversion/servers, on the bottom, after the [global])
ssl-authority-files = /etc/ssl/certs/cacert-root-ca.crt

And then I hacked configclass.inc (and modified config.inc)
Diff as follows:
Index: include/configclass.inc
===================================================================
--- include/configclass.inc     (revision 522)
+++ include/configclass.inc     (working copy)
@@ -434,6 +434,7 @@
    // Tool path locations
 
    var $svnlook = "svnlook";
+   var $config_dir = "/tmp";
    var $svn = "svn --non-interactive --config-dir /tmp";
    var $svn_noparams = "svn --config-dir /tmp"; 
    var $diff = "diff";
@@ -811,6 +812,15 @@
          
       $var .= " ".$params;
    }
+   
+   // setSVNConfigPath
+   //
+   // Define the location of the svn config directory
+   
+   function setSVNConfigPath($path)
+   {
+      $this->setPath($this->config_dir, $path, "", "");
+   }
 
    // setSVNCommandPath
    //
@@ -818,8 +828,8 @@
    
    function setSVNCommandPath($path)
    {
-      $this->setPath($this->svn, $path, "svn", "--non-interactive --config-dir /tmp");
-      $this->setPath($this->svn_noparams, $path, "svn", " --config-dir /tmp");
+      $this->setPath($this->svn, $path, "svn", "--non-interactive --config-dir ".$this->config_dir);
+      $this->setPath($this->svn_noparams, $path, "svn", " --config-dir ".$this->config_dir);
       $this->setPath($this->svnlook, $path, "svnlook");
    }


Note: the configuration location set function must be called BEFORE setSVNCommandPath. ie;
$config->setSVNConfigPath("/Path/To/Subversion/config/.subversion ie. /Users/benjamin/.subversion");
$config->setSVNCommandPath("/usr/local/bin/");

Also, yes, it does use your subversion settings. I see no problems with this, but I may be sadly mistaken. If you want to play it safe, recreate the folder somewhere and set the "servers" file there.

--
Side note: accessing an SVN repository remotely is quite slow. If you have alternatives, use them.

Date: 2007-03-09 01:00 am (UTC)
From: [identity profile] porsupah.livejournal.com
As I recall, Subcommander worked very easily, and remotely.

Date: 2007-03-09 01:07 am (UTC)
From: [identity profile] ibneko.livejournal.com
Hmm, spiffy, but I wanted something that would run in a browser, so it could be viewed on any computer, from anywhere. (yeeah, wasn't really specific enough)

Expand Cut Tags

No cut tags

Profile

ibneko: (Default)
ibneko

Most Popular Tags

Style Credit

Page generated Jul. 8th, 2025 10:27 pm
Powered by Dreamwidth Studios
January 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2021