About Folder History with SVNParentPath

21 views
Skip to first unread message

cami...@gmail.com

unread,
Jan 27, 2008, 6:43:16 PM1/27/08
to ReposStyle
Hi,

I am trying to use Folder History from Repos Style, but I do not know
how to change the code of repos.xsl in order to get the name of the
repository.

I would like to setup open/log/index.php Repository variable to the
parent path of the repository, and let the folder history link pass to
the target parameter not only the path inside the repository, but also
the repository name.

Configuration:
apache:

<Location /repos>
# SVN configuration
</Location>

ccvotagus is one of the repositories

url: http://fontopus.net/repos/ccvotagus/

Example present:
folder history: http://fontopus.net/repos-web/open/log/?target=/

Example willing:
folder history: http://fontopus.net/repos-web/open/log/?target=/ccvotagus/

I ask for help.

cami...@gmail.com

unread,
Jan 27, 2008, 6:45:44 PM1/27/08
to ReposStyle
The correct example urls are:

url:https://fontopus.net/repos/ccvotagus/

Example present:
folder history:https://fontopus.net/repos-web/open/log/?target=/

Example willing:
folder history:https://fontopus.net/repos-web/open/log/?target=/
ccvotagus/

Staffan Olsson

unread,
Jan 28, 2008, 10:43:24 AM1/28/08
to repos...@googlegroups.com
Hi,

Yep, this is very tricky. There is a contributed solution to this,
which you might be able to use. I've done a lot of searching, but as
far as I know there is no way to send parameters to the XSLT engine in
the browser. At least no cross-browser solution. Quite frustrating,
since it would be ideal to override default xsl:param values with
query parameters. You get used to limitations like that when you work
with XSLT.

One solution would be to do server-side transform using one of the
many mod_xslt implementations. I've tried this, but the mod_xslt
shipped with Debian had no straightforward xsl:param support either.
Strange, since it is easy to set programmatically in XSLT engines like
Xalan. It think it would be possible to figure out a server-side
solution, but I'm not sure if anyone wants to install extra modules in
Apache.

The contributed solution is a branch in the source:
https://labs.repos.se/data/style/branches/multi-repo/
It is branched from 1.2, but you'll get the idea from the logs. It is
based on a javascript that is able to figure out what repository
you're in. It's a good solution, but being javascript it has to be
tested properly before it is added to the official distributions.

What do you think?

/Staffan

cami...@gmail.com

unread,
Jan 28, 2008, 7:37:22 PM1/28/08
to ReposStyle
Hi,

I found a great but I confess, a little dirty workaround, by using in
index.php the php variable $_SERVER['HTTP_REFERER']
It works only when the link comes from the repository page.
I am thinking of changing repos.xsl logUrl parameter, to something
like open/log/byreferer.php?unused=
and create a modified index.php as byreferer.php file.
I think it will work with me using firefox and may be also IE.

I will study the javascript solution when my workaround get non
functional.

Thank you very much!

And I liked very much of reposstyle!

On Jan 28, 1:43 pm, "Staffan Olsson" <sols...@gmail.com> wrote:
> Hi,
>
> Yep, this is very tricky. There is a contributed solution to this,
> which you might be able to use. I've done a lot of searching, but as
> far as I know there is no way to send parameters to the XSLT engine in
> the browser. At least no cross-browser solution. Quite frustrating,
> since it would be ideal to override default xsl:param values with
> query parameters. You get used to limitations like that when you work
> with XSLT.
>
> One solution would be to do server-side transform using one of the
> many mod_xslt implementations. I've tried this, but the mod_xslt
> shipped with Debian had no straightforward xsl:param support either.
> Strange, since it is easy to set programmatically in XSLT engines like
> Xalan. It think it would be possible to figure out a server-side
> solution, but I'm not sure if anyone wants to install extra modules in
> Apache.
>
> The contributed solution is a branch in the source:https://labs.repos.se/data/style/branches/multi-repo/
> It is branched from 1.2, but you'll get the idea from the logs. It is
> based on a javascript that is able to figure out what repository
> you're in. It's a good solution, but being javascript it has to be
> tested properly before it is added to the official distributions.
>
> What do you think?
>
> /Staffan
>

Staffan Olsson

unread,
Jan 29, 2008, 1:41:28 AM1/29/08
to repos...@googlegroups.com
Good to hear. As a fallback when referer is not set, there could be a
dropdown at the top of the log page when you can select repository.

/Staffan

Reply all
Reply to author
Forward
0 new messages