[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Linking viewcvs from mod_dav_svn pages

From: Larson, Aaron \(MN65\) <Aaron.Larson_at_honeywell.com>
Date: 2006-02-18 02:45:39 CET

The mod_dav_svn web interface is very nice for quickly browsing the
repository and accessing html pages and other documents works very
well, even with relative links. These facts mean that most of our
team uses the svn web interface as their primary browsing interface.

I thought it would be nice to have a link on the SVN page contain a
link to the corresponding viewcvs page so that history would be "just
a click away". I modified svnindex.xls and I really like the result
(small patch below).

However, there is a problem. The mod_dav_svn generated xml doesn't
include the repository name, and that means I can't construct a
reference to the appropriate viewcvs repository path. I assumed I
could use the base-uri of the xml page, but I failed miserably. My
sense after several hours of searching was that getting the base-uri
of an xml 1.0 page is not possible (at least with my skill level).
 
I realize this is, perhaps, not the best place for this question, but
it seemed like a reasonable starting place, and I'm hoping in the
worst case that someone might have a different idea how to accomplish
the same thing.

Here's my patch (note that we use "viewscm" rather than "viewcvs" as
the root of our viewCVS).

mydeosbash$ diff -c svnindex.xsl.~1~ svnindex.xsl
*** svnindex.xsl.~1~ Tue Dec 28 12:20:24 2004
--- svnindex.xsl Thu Feb 16 19:58:46 2006
***************
*** 45,52 ****
--- 45,60 ----
          </xsl:if>
        </xsl:if>
        <xsl:if test="string-length(@rev) != 0">
+ <xsl:element name="a"> <!-- Playing with integrating ViewSCM
into SCM browser -->
+ <xsl:attribute name="href">
+ /viewscm<xsl:value-of select="@path"></xsl:value-of>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:text>View history of this directory (only for xxx
repository).</xsl:text>
+ </xsl:attribute>
          <xsl:text>Revision </xsl:text>
          <xsl:value-of select="@rev"/>
+ </xsl:element>
        </xsl:if>
      </div>
      <div class="path">

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Feb 18 02:46:56 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.