repos-style's view history problem when using subversion in parent listing mode and as location root

22 views
Skip to first unread message

PaNtHaLooN

unread,
Aug 13, 2009, 2:21:57 PM8/13/09
to ReposStyle
I'm currently using subversion with

"SVNParentPath /my/foo/bar/svn" and "SVNListParentPath on" in a root
Loaction "/".

Example:
http://svn.mydomain.com/myrepos

Only problem I had was that in the "Collection of Repositories"
Listing "view history" provides non-functional links resulting in
errors.
I've identified the problem and patched it - all other usages should
still be fully functional. Only affected file repos.xsl.

In the '<xsl:template match="dir">' section replace the following code
block:


<xsl:if test="$logUrl">
<a id="history:{$id}" class="action" href="{$logUrl}target={../
@path}/{@href}">view history</a>
</xsl:if>

with:

<xsl:choose>
<xsl:when test="string-length(/svn/index/@base) != 0">
<xsl:if test="$logUrl">
<a id="history:{$id}" class="action" href="{$logUrl}target={../
@path}/{@href}">view history</a>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:element name="a">
<xsl:attribute name="id">history:<xsl:value-of select="$id"/></
xsl:attribute>
<xsl:attribute name="class">action</xsl:attribute>
<xsl:attribute name="href"><xsl:value-of select="$static"/>open/
log/?base=<xsl:value-of select="@name"/>&#38;target=/</xsl:attribute>
<xsl:text>view history</xsl:text>
</xsl:element>
</xsl:otherwise>
</xsl:choose>

That's all.

Regards PaNtHaLooN

Theo Barker

unread,
Aug 16, 2009, 11:57:30 PM8/16/09
to repos...@googlegroups.com
I had already fixed it in the code tree. It will be in the next release (unless Staffan doesn't like it ;-). See the patch at:
https://labs.repos.se/repos-web/open/diff/?target=/style/trunk/repos-web/view/repos.xsl&rev=551&fromrev=550
log/?base=<xsl:value-of select="@name"/>&target=/</xsl:attribute>

Staffan

unread,
Aug 18, 2009, 1:41:27 PM8/18/09
to repos...@googlegroups.com
On Mon, Aug 17, 2009 at 5:57 AM, Theo Barker<theo_...@yahoo.com> wrote:
>
> I had already fixed it in the code tree. It will be in the next release (unless Staffan doesn't like it ;-). See the patch at:
> https://labs.repos.se/repos-web/open/diff/?target=/style/trunk/repos-web/view/repos.xsl&rev=551&fromrev=550
>
It's always good with new fixes. I may have my own quick fix for this
"Collection of Repositories" issue lying around somewhere too :) In
the next release I'll combine the fixes into the ultimate fix :). I
think the most non-intrusive solution uses the xsl:if from Theo's
solution and uses PaNtHaLooN's solution to avoid the need for a new
xsl:with-param.

/Staffan
Reply all
Reply to author
Forward
0 new messages