The log script must be configured with a root URL

2,109 views
Skip to first unread message

arch...@gmail.com

unread,
Feb 21, 2008, 12:30:11 PM2/21/08
to ReposStyle
I want to enable the history viewing.
I get this message on my site, and in your sample site
http://www.reposstyle.com/samples/.

What do I need to change to get this to work?

BTW,
Nice work with everything else.

Alex

Staffan Olsson

unread,
Feb 21, 2008, 3:27:01 PM2/21/08
to repos...@googlegroups.com
Hi Alex,

It is good that you ask. We should have documented this better.

In repos-web/open/log/index.php there is a line:
$repo = '@@Repository@@'; // repository root, no trailing slash

Replace @@Repository@@ with the subversion url to your repository root.

It can be any subversion URL, both http:// and file:///. You can use
"http:" if you have public read access to the repository. If the
repository needs authentication, it is better to use the local "file:"
url. If you don't want everyone to be able to see the logs when using
"file:", protect the apache location or directory /repos-web/open/
with "Require valid-user" or something like that.

/Staffan

arch...@gmail.com

unread,
Feb 26, 2008, 3:17:45 PM2/26/08
to ReposStyle
Thanks for the information.

I changed the setting and I am now getting...

svn: Can't open file '/root/.subversion/servers': Permission denied

Any ideas?

Alex
On Feb 21, 3:27 pm, "Staffan Olsson" <sols...@gmail.com> wrote:
> Hi Alex,
>
> It is good that you ask. We should have documented this better.
>
> In repos-web/open/log/index.php there is a line:
> $repo = '@@Repository@@'; // repository root, no trailing slash
>
> Replace @@Repository@@ with the subversion url to your repository root.
>
> It can be any subversion URL, both http:// and file:///. You can use
> "http:" if you have public read access to the repository. If the
> repository needs authentication, it is better to use the local "file:"
> url. If you don't want everyone to be able to see the logs when using
> "file:", protect the apache location or directory /repos-web/open/
> with "Require valid-user" or something like that.
>
> /Staffan
>
> On Thu, Feb 21, 2008 at 6:30 PM, archer...@gmail.com

Staffan Olsson

unread,
Feb 27, 2008, 3:06:31 PM2/27/08
to repos...@googlegroups.com
Maybe the user that you web server runs as can not execute subversion
commands? You could experiment with the line
$cmd = 'svn log --xml --verbose --incremental --non-interactive';
and maybe add a --config-dir parameter?

/Staffan

Scott

unread,
Mar 23, 2008, 1:19:23 AM3/23/08
to ReposStyle
> In repos-web/open/log/index.php there is a line:
> $repo = '@@Repository@@'; // repository root, no trailing slash
>
> Replace @@Repository@@ with the subversion url to your repository root.
>
> It can be any subversion URL, both http:// and file:///. You can use
> "http:" if you have public read access to the repository. If the
> repository needs authentication, it is better to use the local "file:"
> url. If you don't want everyone to be able to see the logs when using
> "file:", protect the apache location or directory /repos-web/open/
> with "Require valid-user" or something like that.
>

I get a blank page doing this. In fact clicking on view history gives
not but a blank page editing this file or not.

No errors in the logs that I can see either. What could be going
wrong?

Staffan Olsson

unread,
Mar 23, 2008, 12:12:19 PM3/23/08
to repos...@googlegroups.com

Sorry, I don't understand the error. Is it the browser that instead of
showing a page gives you a save dialog?

Scott

unread,
Mar 23, 2008, 6:23:07 PM3/23/08
to ReposStyle


On Mar 23, 9:12 am, "Staffan Olsson" <sols...@gmail.com> wrote:
I get a blank page.

Staffan Olsson

unread,
Mar 24, 2008, 2:07:47 PM3/24/08
to repos...@googlegroups.com
Try to add:
error_reporting(E_ALL);
at the top of the php file to see if you get any error messages.

/Staffan

Scott

unread,
Mar 25, 2008, 5:47:45 PM3/25/08
to ReposStyle
On Mar 24, 11:07 am, "Staffan Olsson" <sols...@gmail.com> wrote:
> Try to add:
> error_reporting(E_ALL);
> at the top of the php file to see if you get any error messages.
>
> /Staffan
>

Apache errors follow......

mod_xslt: failed to load external entity "/repos-web/view/log.xsl"
mod_xslt: couldn't load: /repos-web/view/log.xsl (/repos-web/view/
log.xsl), errno: 2
mod_xslt: fatal - couldn't load stylesheet for: /var/www/html/vhosts/
foxdev-svn/repos-web/open/log/index.php

That index.php line has...

header('Content-Type: text/xml');
echo('<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/repos-web/view/log.xsl"?>
<log limit="'.$limit.'">
');
passthru($cmd);
echo('</log>
');
?>

I even tried a absolute reference and that blew as well.

Scott

unread,
Mar 25, 2008, 5:55:46 PM3/25/08
to ReposStyle


On Feb 21, 1:27 pm, "Staffan Olsson" <sols...@gmail.com> wrote:
> Hi Alex,
>
> It is good that you ask. We should have documented this better.
>
> In repos-web/open/log/index.php there is a line:
> $repo = '@@Repository@@'; // repository root, no trailing slash
>
> Replace @@Repository@@ with the subversion url to your repository root.

Is that the working copy path?

Because I am a bit confused with what to put there.

If my svn is located at http://www.some.domain/svn/ then would my
path be that?

Because in your index.php I see...
// === Print svn log --xml to response ===
$repo = 'http://www.some.domain/svn'; // repository root, no trailing
slash

But svn log --xml ONLY works with working copies not the actual svn
repo.

Staffan Olsson

unread,
Mar 26, 2008, 3:10:22 PM3/26/08
to repos...@googlegroups.com

Yes, that URL or the local file:// url, see
http://groups.google.com/group/reposstyle/msg/d0bead994c6b9abb

I don't agree that log is only for local operations. Try (svn 1.4) for example
svn log --xml https://labs.repos.se/data/style/trunk/

/Staffan

Staffan Olsson

unread,
Mar 26, 2008, 3:15:24 PM3/26/08
to repos...@googlegroups.com

Looks like you have mod_xslt installed on your server. I am very
interested to see if you can get this working. There are a couple of
mod_xslt distributions out there. The one I've tried had problems with
the inline xml-stylesheet declaration, which seems to be the same
problem that you have.

Maybe you can add a configuration directive to either disable mod_xslt
for this url, or one that sets the stylesheet path. Or you can try
"../../view/log.xml" or an absolute local path in the xml-stylesheet
declaration.

/Staffan

Scott

unread,
Mar 26, 2008, 8:50:28 PM3/26/08
to ReposStyle


On Mar 26, 12:15 pm, "Staffan Olsson" <sols...@gmail.com> wrote:
Disabling mod_xslt gives me a error: Error loading stylesheet: Parsing
an XSLT stylesheet failed

So we can't do that.

No absolute path has worked so far. I have no idea what to try now.

solsson

unread,
Mar 27, 2008, 3:28:05 AM3/27/08
to ReposStyle
Don't give up yet. There is nothing complex with this log viewer, it
is just a php file that runs an svn command, and declares the xslt
stylesheet to use when viewing the output.

Is it the browser or the server that says "Error loading stylesheet:
Parsing
an XSLT stylesheet failed"? I have never seen that error.

Have you tried removing the <?xml-stylesheet type="text/xsl" href="/
repos-web/view/log.xsl"?> line from the php, too see if you get
output to the browser then?

I can tell you how I would troubleshoot this.
1. Use curl (http://curl.haxx.se/) to see what http://www.some.domain/repos-web/open/log/
responds
(browser's page info or view source can be used for this too)
2. If xml is received but no output is shown in browser, I would try a
different browser for an xslt error message.
3. If no data is received, I would make sure error_reporting(ALL) is
on in the code (I already have that setting in php.ini), and try step
1 again
4. If still no error, I would check the apache logs for errors.

/Staffan

Scott

unread,
Mar 27, 2008, 3:53:34 AM3/27/08
to ReposStyle
On Mar 27, 12:28 am, solsson <sols...@gmail.com> wrote:
>
> Don't give up yet. There is nothing complex with this log viewer, it
> is just a php file that runs an svn command, and declares the xslt
> stylesheet to use when viewing the output.
>
> Is it the browser or the server that says "Error loading stylesheet:
> Parsing
> an XSLT stylesheet failed"? I have never seen that error.
>
> Have you tried removing the <?xml-stylesheet type="text/xsl" href="/
> repos-web/view/log.xsl"?> line from the php, too see if you get
> output to the browser then?
>
> I can tell you how I would troubleshoot this.
> 1. Use curl (http://curl.haxx.se/) to see whathttp://www.some.domain/repos-web/open/log/
> responds
> (browser's page info or view source can be used for this too)
> 2. If xml is received but no output is shown in browser, I would try a
> different browser for an xslt error message.
> 3. If no data is received, I would make sure error_reporting(ALL) is
> on in the code (I already have that setting in php.ini), and try step
> 1 again
> 4. If still no error, I would check the apache logs for errors.
>
> /Staffan

Ok I found a fix I think.....

added a .htaccess file to "repos-web/open/log/" and added " AddType
text/xsl .xsl"

But now I got a new error so maybe we are getting someplace now?

svn: Unable to open an ra_local session to URL

Scott

unread,
Mar 27, 2008, 4:26:37 AM3/27/08
to ReposStyle
I give up -- tried everything and always a new error. Having log
hostory just isn't a need at this point but thanks the nice repo
layout. Much better then the standard one I found.

But on that note I do have a some sort of stylesheet error per-se.

Look at https://svn.savannah.borgnet.us/svn/

It says "ollection of Repositories" instead of "Collection of
Repositories" -- something cut off the C but I can't figure out were.

If you look at the NON-SSL http://svn.savannah.borgnet.us/svn/ it's
correct. I use the default xsl sheet there.

solsson

unread,
Mar 27, 2008, 2:51:19 PM3/27/08
to ReposStyle
> Look athttps://svn.savannah.borgnet.us/svn/
>
> It says "ollection of Repositories" instead of "Collection of
> Repositories" -- something cut off the C but I can't figure out were.
>
> If you look at the NON-SSLhttp://svn.savannah.borgnet.us/svn/it's
> correct. I use the default xsl sheet there.

Thanks for pointing this out. It is a bug. I've committed a new sample
xml that demonstrates this. It will be fixed in release 1.5.

/Staffan

Scott

unread,
Mar 28, 2008, 5:44:17 AM3/28/08
to ReposStyle
Found a backdoor way to make the logging work but it has some sort of
error -- see curl https://svn.savannah.borgnet.us/repos-web/open/log/?target=/clearurlbutton/

That is a modified url that uses the base repo name opposed to yours
works.

It calls svn://svn.borgnet.us:81/ as the root but it outputs the
logging differently ?

svn log --xml svn://svn.borgnet.us:81/clearurlbutton

Staffan Olsson

unread,
Mar 28, 2008, 11:48:55 AM3/28/08
to repos...@googlegroups.com

Interesting. Can you disable mod-xslt again? I'd like to see the xml.
I don't have a server with mod_xsl, but i might be able to find out
what xslt lib it is using so I can verify that the xsl is compatible.

/Staffan

Staffan Olsson

unread,
Mar 28, 2008, 12:24:36 PM3/28/08
to repos...@googlegroups.com
On Fri, Mar 28, 2008 at 10:44 AM, Scott <sgra...@gmail.com> wrote:
>

Funny. As I wrote earlier, the mod-xslt mess is really a mess.
Here's a proof from the debian package
(http://packages.debian.org/etch/libapache2-modxslt):

"It differs from many other mod-xslt"

/Staffan

Scott

unread,
Mar 28, 2008, 5:09:23 PM3/28/08
to ReposStyle
On Mar 28, 9:24 am, "Staffan Olsson" <sols...@gmail.com> wrote:
> On Fri, Mar 28, 2008 at 10:44 AM, Scott <sgray...@gmail.com> wrote:
>
> > Found a backdoor way to make the logging work but it has some sort of
> > error -- see curlhttps://svn.savannah.borgnet.us/repos-web/open/log/?target=/clearurlb...
>
> > That is a modified url that uses the base repo name opposed to yours
> > works.
>
> > It calls svn://svn.borgnet.us:81/ as the root but it outputs the
> > logging differently ?
>
> > svn log --xml svn://svn.borgnet.us:81/clearurlbutton
>
> Funny. As I wrote earlier, the mod-xslt mess is really a mess.
> Here's a proof from the debian package
> (http://packages.debian.org/etch/libapache2-modxslt):
>
> "It differs from many other mod-xslt"
>
> /Staffan

Ok the mod_xslt2 is disabled. There is certainly a difference in the
output now.

Scott

unread,
Mar 28, 2008, 5:12:05 PM3/28/08
to ReposStyle
On Mar 28, 8:48 am, "Staffan Olsson" <sols...@gmail.com> wrote:
> On Fri, Mar 28, 2008 at 10:44 AM, Scott <sgray...@gmail.com> wrote:
>
> > Found a backdoor way to make the logging work but it has some sort of
> > error -- see curlhttps://svn.savannah.borgnet.us/repos-web/open/log/?target=/clearurlb...
>
> > That is a modified url that uses the base repo name opposed to yours
> > works.
>
> > It calls svn://svn.borgnet.us:81/ as the root but it outputs the
> > logging differently ?
>
> > svn log --xml svn://svn.borgnet.us:81/clearurlbutton
>
> Interesting. Can you disable mod-xslt again? I'd like to see the xml.
> I don't have a server with mod_xsl, but i might be able to find out
> what xslt lib it is using so I can verify that the xsl is compatible.
>
> /Staffan

Also the style sheet wont parse after removing mod_xslt2. See
https://svn.savannah.borgnet.us/svn/

Scott

unread,
Mar 28, 2008, 5:19:37 PM3/28/08
to ReposStyle
On Mar 28, 8:48 am, "Staffan Olsson" <sols...@gmail.com> wrote:
> On Fri, Mar 28, 2008 at 10:44 AM, Scott <sgray...@gmail.com> wrote:
>
> > Found a backdoor way to make the logging work but it has some sort of
> > error -- see curlhttps://svn.savannah.borgnet.us/repos-web/open/log/?target=/clearurlb...
>
> > That is a modified url that uses the base repo name opposed to yours
> > works.
>
> > It calls svn://svn.borgnet.us:81/ as the root but it outputs the
> > logging differently ?
>
> > svn log --xml svn://svn.borgnet.us:81/clearurlbutton
>
> Interesting. Can you disable mod-xslt again? I'd like to see the xml.
> I don't have a server with mod_xsl, but i might be able to find out
> what xslt lib it is using so I can verify that the xsl is compatible.
>
> /Staffan

frankly I don't see how you can use a xsl style sheet without needing
mod_xslt2 so maybe you can explain how your server is serving those
pages and what mod

Staffan Olsson

unread,
Mar 28, 2008, 5:23:34 PM3/28/08
to repos...@googlegroups.com

I think I've got this one figured out. The log's stylesheet
declaration is an absolute url. It starts with http, but the url is
https. Browsers regard this as cross-domain loading, which is not
allowed.

You can use the absolute url from root, or use $_SERVER['HTTPS']=='on'
in php to detect https (unless you have a proxy that fools apache to
think it is not https).

/Staffan

Staffan Olsson

unread,
Mar 28, 2008, 5:25:57 PM3/28/08
to repos...@googlegroups.com

This is a bit strange. The source says
<?xml-stylesheet type="text/xsl" href="repos-web/view/repos.xsl"?>

I wonder why it says parse error if that's the problem. Does it work
if you start the href with a slash?

/Staffan

Scott

unread,
Mar 28, 2008, 5:31:34 PM3/28/08
to ReposStyle
On Mar 28, 2:23 pm, "Staffan Olsson" <sols...@gmail.com> wrote:
I have tried every combination of the url and non worked -- using the
https didn't work at all that's why I used the http instead.

Scott

unread,
Mar 28, 2008, 5:33:18 PM3/28/08
to ReposStyle
On Mar 28, 2:25 pm, "Staffan Olsson" <sols...@gmail.com> wrote:
Yes tried the slash but when I did that the sheet couldn't be found.
Maybe because the apache directive <Location /svn> was messing it up
but you can't avoid that because you need to define what is svn stuff.

Scott

unread,
Mar 28, 2008, 5:37:29 PM3/28/08
to ReposStyle
On Mar 28, 2:25 pm, "Staffan Olsson" <sols...@gmail.com> wrote:
Ahhhh you are right ! There is certainly a friggin mess with mod_xslt2
-- adding the / back worked......

I'll try the logging again now

Scott

unread,
Mar 28, 2008, 5:40:33 PM3/28/08
to ReposStyle
On Mar 28, 2:25 pm, "Staffan Olsson" <sols...@gmail.com> wrote:
Logging will not work with multiple repos :(

That is a big drawback.

Scott

unread,
Mar 28, 2008, 5:46:41 PM3/28/08
to ReposStyle
On Mar 28, 2:25 pm, "Staffan Olsson" <sols...@gmail.com> wrote:
fixing the repo path to point to just 1 repo works just for this
testing on clearurlbutton

now see https://svn.savannah.borgnet.us/repos-web/open/log/?target=/website/footer.html

It works !!

YOU NEED TO SUPPORT MULTIPLE SVN REPOS and then this style sheet would
rock :)


Theo Barker

unread,
Mar 29, 2008, 12:26:48 AM3/29/08
to repos...@googlegroups.com
There is a version that I made to work with multiple SVN repos. See https://labs.repos.se/data/style/branches/multi-repo/

HTH,
Theo

now see https://svn.savannah.borgnet.us/repos-web/open/log/?target=/website/footer.html

It works !!

____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com

Theo Barker

unread,
Mar 29, 2008, 12:28:51 AM3/29/08
to repos...@googlegroups.com
Oh, I forgot. IIRC, this only fully works with Mozilla browsers because of the lack of good javascript support in the IE browsers.

----- Original Message ----
From: Theo Barker <theo_...@yahoo.com>
To: repos...@googlegroups.com
Sent: Friday, March 28, 2008 10:26:48 PM
Subject: [repos style] Re: The log script must be configured with a root URL


There is a version that I made to work with multiple SVN repos. See https://labs.repos.se/data/style/branches/multi-repo/

HTH,
Theo

----- Original Message ----
From: Scott <sgra...@gmail.com>
To: ReposStyle <repos...@googlegroups.com>
Sent: Friday, March 28, 2008 3:46:41 PM
Subject: [repos style] Re: The log script must be configured with a root URL

<snip>

fixing the repo path to point to just 1 repo works just for this
testing on clearurlbutton

now see https://svn.savannah.borgnet.us/repos-web/open/log/?target=/website/footer.html

It works !!

YOU NEED TO SUPPORT MULTIPLE SVN REPOS and then this style sheet would
rock :)

____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com


____________________________________________________________________________________
OMG, Sweet deal for Yahoo! users/friends:Get A Month of Blockbuster Total Access, No Cost. W00t
http://tc.deals.yahoo.com/tc/blockbuster/text2.com

Scott

unread,
Mar 29, 2008, 2:30:20 AM3/29/08
to ReposStyle
On Mar 28, 9:28 pm, Theo Barker <theo_bar...@yahoo.com> wrote:
> Oh, I forgot. IIRC, this only fully works with Mozilla browsers because of the lack of good javascript support in the IE browsers.
>
> ----- Original Message ----
> From: Theo Barker <theo_bar...@yahoo.com>
> To: repos...@googlegroups.com
> Sent: Friday, March 28, 2008 10:26:48 PM
> Subject: [repos style] Re: The log script must be configured with a root URL
>
> There is a version that I made to work with multiple SVN repos. Seehttps://labs.repos.se/data/style/branches/multi-repo/
>
> HTH,
> Theo

Don't care about IE users -- they shouldn't be using that crappy piece
of code in the first place.

But how do I build your version from svn checkout ?

Staffan Olsson

unread,
Mar 29, 2008, 4:27:43 AM3/29/08
to repos...@googlegroups.com

Do you mean access logging? I doubt that the repos style xsl could
have anything to do with that.

/Staffan

Staffan Olsson

unread,
Mar 29, 2008, 4:35:07 AM3/29/08
to repos...@googlegroups.com

You can read about client side xslt at
http://en.wikipedia.org/wiki/XSL_Transformations.
All browsers I know of, except Lynx, support it. One advantage over
server side transformations is that with SVNIndexXSLT, subversion
responds with plain xml -- small, standard, can be used with AJAX.
This is why I never bothered to configure mod-xslt.

It is
<?xml-stylesheet type="text/xsl" href="/repos-web/view/repos.xsl"?>
in the xml that activates client side transformations. Without it you
would see only xml.

/Staffan

Staffan Olsson

unread,
Mar 29, 2008, 4:40:57 AM3/29/08
to repos...@googlegroups.com
On Sat, Mar 29, 2008 at 5:28 AM, Theo Barker <theo_...@yahoo.com> wrote:
>
> Oh, I forgot. IIRC, this only fully works with Mozilla browsers because of the lack of good javascript support in the IE browsers.
>

Some other solutions have been discussed on this mailing list, like
relying on HTTP_REFERER, but that is not entirely reliable either. The
minute we have a cross-browser cross-platform solution to using the
same log viewer for multiple repositories you'll have a new release of
repos style.

/Staffan

Staffan Olsson

unread,
Mar 29, 2008, 4:45:20 AM3/29/08
to repos...@googlegroups.com

:-)
totally agree

You can see the diffs for that branch:
svn diff -r249:HEAD https://labs.repos.se/data/style/branches/multi-repo/

Or you can check out the project and build using Ant, however this is
based on the 1.3 release I think.

/Staffan

Staffan Olsson

unread,
Mar 29, 2008, 4:55:51 AM3/29/08
to repos...@googlegroups.com

Give me until tomorrow and I'll find the time to think about the
available options and come up with an official (but probably not
optimal) solution to this.

/Staffan

yjeanrenaud

unread,
Aug 29, 2012, 6:44:57 AM8/29/12
to repos...@googlegroups.com
works great, also the log viewer, but not on windows:
I do get XML malformed errors:

svn: E155007: �D:\AA-6...
--------------^
there seems to be a \t in the log which can not be formated well into xml. Any solutions?

Daryl Lim

unread,
Feb 8, 2014, 10:56:44 AM2/8/14
to repos...@googlegroups.com
Hi,

Understand this is an old post but I only recently got my hands on this and am experiencing the issue with getting "version history" to work behind https. I am getting this error after setting my $repos var to https://218.186.176.150/svn/repository:

svn: OPTIONS of 'https://218.186.176.150/svn/repository/repository/projects': Server certificate verification failed: certificate issued for a different hostname, issuer is not trusted (https://218.186.176.150)

I am using a self-signed certificate for this. How can I get this to work? Thanks in advance!

-- lyradmil

On Thursday, March 27, 2008 2:10:22 AM UTC+7, solsson wrote:
On Tue, Mar 25, 2008 at 10:55 PM, Scott <sgra...@gmail.com> wrote:
>
>
>
>  On Feb 21, 1:27 pm, "Staffan Olsson" <sols...@gmail.com> wrote:
>  > Hi Alex,
>  >
>  > It is good that you ask. We should have documented this better.
>  >
>  > In repos-web/open/log/index.php there is a line:
>  > $repo = '@@Repository@@'; // repository root, no trailing slash
>  >
>  > Replace @@Repository@@ with the subversion url to your repository root.
>
>  Is that the working copy path?
>
>  Because I am a bit confused with what to put there.
>
>  If my svn is located at http://www.some.domain/svn/  then would my
>  path be that?
>
>  Because in your index.php I see...
>  // === Print svn log --xml to response ===
>  $repo = 'http://www.some.domain/svn'; // repository root, no trailing
>  slash
>
>  But svn log --xml ONLY works with working copies not the actual svn
>  repo.
>

Yes, that URL or the local file:// url, see
http://groups.google.com/group/reposstyle/msg/d0bead994c6b9abb

I don't agree that log is only for local operations. Try (svn 1.4) for example
svn log --xml https://labs.repos.se/data/style/trunk/

/Staffan

Reply all
Reply to author
Forward
0 new messages