Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /insurrection/src/

Project highlights: A modern, light-weight, self-contained, web-based toolset for Subversion repository browsing and administration.  A live system can be seen in action here.

insurrection
Discussion topic

Back to topic list

CVS update: /insurrection/src/

Author mksoft
Full name Michae Sinz
Date 2005-10-04 12:00:46 PDT
Message User: mksoft
Date: 2005/10/04 12:00:46

Added:
   insurrection/src/ls.cgi
   insurrection/src/ls.dtd

Modified:
   insurrection/src/.htaccess
   insurrection/src/ins​urrection.xsl
   insurrection/src/log.cgi
   insurrection/src/styles.css
   insurrection/src/svnindex.js

Log:
 Bring up-to-date with the latest code in the subversion repository at
 http://svn.sinz.com/​svn/Insurrection/tru​nk/

File Changes:

Directory: /insurrection/src/
=============================

File [changed]: .htaccess
Url: http://insurrection.​tigris.org/source/br​owse/insurrection/sr​c/.htaccess?r1=1.21​&r2=1.22
Delta lines: +24 -6
--------------------
--- .htaccess 28 Sep 2005 16:24:22 -0000 1.21
+++ .htaccess 4 Oct 2005 19:00:44 -0000 1.22
@@ -1,5 +1,5 @@
 ##
-## $Id: .htaccess,v 1.21 2005/09/28 16:24:22 mksoft Exp $
+## $Id: .htaccess,v 1.22 2005/10/04 19:00:44 mksoft Exp $
 ## Copyright 2004,2005 - Michael Sinz
 ##
 
@@ -54,7 +54,7 @@
 ## mod_authz_svn take care of the path check before
 ## we proxy to here. We then just validate in these
 ## scripts that we have been proxied.
-<Files ~ "^(atom|blame|diff|g​et|log|rss)\.cgi$"​>
+<Files ~ "^(atom|blame|diff|g​et|log|ls|rss)\.cgi​$">
     SetHandler cgi-script
 </Files>
 
@@ -133,9 +133,8 @@
 ## last parameter before the end of the URI. Ugly but it works...
 RewriteCond %{REQUEST_METHOD} GET [OR]
 RewriteCond %{REQUEST_METHOD} POST
-RewriteCond %{QUERY_STRING} Insurrection=(admin|​atom|bandwidth|blame​|diff|dump|get|log|r​ss)
+RewriteCond %{QUERY_STRING} Insurrection=(admin|​atom|bandwidth|blame​|diff|dump|get|log|l​s|rss)
 RewriteRule ^svn(/.*)$ "http://%{HTTP_HOST}/​%1.cgi?%{QUERY_STRIN​G}&HTTPS=%{HTTPS​}&Path=$1" [P,L]
-#RewriteRule ^svn/(.*)$ "http://%{HTTP_HOST}/%1.cgi/$1" [P,L]
 
 ## What a trick - to get the broken browsers to work.
 ## Now the need XMLHttp, but the don't need the XSLT
@@ -168,6 +167,25 @@
 RewriteCond %{HTTP_USER_AGENT} Opera [OR]
 RewriteCond %{HTTP_USER_AGENT} Safari [OR]
 RewriteCond %{HTTP_USER_AGENT} Konqueror
-RewriteRule ^svn(/.*/)$ "http://%{HTTP_HOST}/​broken_xslt.cgi?​&Path=$1" [P,L]
-#RewriteRule ^svn/(.*/)$ "http://%{HTTP_HOST}/​broken_xslt.cgi/$1" [P,L]
+RewriteRule ^svn(/.*/)$ "http://%{HTTP_HOST}/​broken_xslt.cgi?HTTP​S=%{HTTPS}&Path=​$1" [P,L]
+
+## The following rule is to catch the directory XML listing
+## request and not let mod_dav_svn answer but rather our own
+## CGI which will produce a slightly enhanced output. This
+## rule is not required, but if it is used, the directory
+## listings will include revision date/number/author for
+## each individual entry.
+##
+## If this rule is not used, you can still get the enhanced
+## listings via the ?Insurrection=ls CGI option (which is
+## basically what this rule does)
+##
+## !!!NOTE!!! If this rule runs before the broken XSLT
+## browser test rule, the enhanced listing
+## CGI will implement the work around.
+## However, this is not the most bandwidth
+## friendly way - so keeping this rule after
+## the broken XSLT hack will solve that.
+RewriteCond %{REQUEST_METHOD} GET
+RewriteRule ^svn(/.*/)$ "http://%{HTTP_HOST}/​ls.cgi?%{QUERY_STRIN​G}&Insurrection=​ls&HTTPS=%{HTTPS​}&Path=$1" [P,L]
 

File [changed]: insurrection.xsl
Url: http://insurrection.​tigris.org/source/br​owse/insurrection/sr​c/insurrection.xsl?r​1=1.28&r2=1.29
Delta lines: +34 -6
--------------------
--- insurrection.xsl 28 Sep 2005 16:24:22 -0000 1.28
+++ insurrection.xsl 4 Oct 2005 19:00:44 -0000 1.29
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- $Id: insurrection.xsl,v 1.28 2005/09/28 16:24:22 mksoft Exp $ -->
+<!-- $Id: insurrection.xsl,v 1.29 2005/10/04 19:00:44 mksoft Exp $ -->
 <!-- Copyright 2004,2005 - Michael Sinz -->
 <!-- This is my magic Insurrection XSLT transform to HTML -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/19​99/XSL/Transform" xmlns:atom="http://purl.org/atom/ns#" version="1.0">
@@ -140,7 +140,7 @@
               <td id="content">
                 <xsl:call-template name="banner"/>
                 <xsl:apply-templates select="index"/>
- <div class="footer" title="$Id: insurrection.xsl,v 1.28 2005/09/28 16:24:22 mksoft Exp $">
+ <div class="footer" title="$Id: insurrection.xsl,v 1.29 2005/10/04 19:00:44 mksoft Exp $">
                   <a title="Valid XML 1.0!" href="http://validator.w3.​org/check?uri=refere​r">
                     <img style="margin-left: 1em;" align="right" border="0" src="/valid-xml10.png" alt="Valid XML 1.0!"/>
                   </a>
@@ -330,7 +330,7 @@
               <xsl:text> - </xsl:text>
             </xsl:if>
             <xsl:if test="string-length(@rev) = 0">
- <xsl:text>&#8212; </xsl:text>
+ <xsl:text> - </xsl:text>
             </xsl:if>
             <xsl:if test="string-length(@rev) != 0">
               <xsl:text>Revision </xsl:text>
@@ -433,6 +433,20 @@
             <xsl:value-of select="@href"/>
           </xsl:attribute>
           <div class="dir">
+ <!-- If we have extended info, put it here -->
+ <xsl:if test="string-length(@revision) != 0">
+ <span class="revinfo">
+ <xsl:value-of select="@date"/>
+ </span>
+ <span class="revinfo">
+ <xsl:text>r​</xsl:text>
+ <xsl:value-of select="@revision"/>
+ </span>
+ <span class="revinfo">
+ <xsl:value-of select="@author"/>
+ </span>
+ <xsl:value-of select="@rev"/>
+ </xsl:if>
             <xsl:element name="img">
               <xsl:attribute name="alt">Folder​</xsl:attribute​>
               <xsl:attribute name="class">svne​ntryicon</xsl:att​ribute>
@@ -518,6 +532,20 @@
             <xsl:value-of select="@href"/>
           </xsl:attribute>
           <div class="file">
+ <!-- If we have extended info, put it here -->
+ <xsl:if test="string-length(@revision) != 0">
+ <span class="revinfo">
+ <xsl:value-of select="@date"/>
+ </span>
+ <span class="revinfo">
+ <xsl:text>r​</xsl:text>
+ <xsl:value-of select="@revision"/>
+ </span>
+ <span class="revinfo">
+ <xsl:value-of select="@author"/>
+ </span>
+ <xsl:value-of select="@rev"/>
+ </xsl:if>
             <xsl:element name="img">
               <xsl:attribute name="alt">File​</xsl:attribute>​
               <xsl:attribute name="class">svne​ntryicon</xsl:att​ribute>
@@ -638,7 +666,7 @@
                 <!-- If we have a morelog tag, we need to provide a way to get it -->
                 <xsl:apply-templates select="morelog"/>
 
- <div class="footer" title="$Id: insurrection.xsl,v 1.28 2005/09/28 16:24:22 mksoft Exp $">
+ <div class="footer" title="$Id: insurrection.xsl,v 1.29 2005/10/04 19:00:44 mksoft Exp $">
                   <a title="Valid XML 1.0!" href="http://validator.w3.​org/check?uri=refere​r">
                     <img style="margin-left: 1em;" align="right" border="0" src="/valid-xml10.png" alt="Valid XML 1.0!"/>
                   </a>
@@ -1013,7 +1041,7 @@
                   </xsl:element>
                 </div>
                 <xsl:apply-templates select="item"/>
- <div class="footer" title="$Id: insurrection.xsl,v 1.28 2005/09/28 16:24:22 mksoft Exp $">
+ <div class="footer" title="$Id: insurrection.xsl,v 1.29 2005/10/04 19:00:44 mksoft Exp $">
                   <!-- Do we really want to say RSS is valid XML since it has no DTD?
                   <a title="Valid XML 1.0!" href="http://validator.w3.​org/check?uri=refere​r">
                     <img style="margin-left: 1em;" align="right" border="0" src="/valid-xml10.png" alt="Valid XML 1.0!"/>
@@ -1132,7 +1160,7 @@
                   </xsl:element>
                 </div>
                 <xsl:apply-templates select="atom:entry"/>
- <div class="footer" title="$Id: insurrection.xsl,v 1.28 2005/09/28 16:24:22 mksoft Exp $">
+ <div class="footer" title="$Id: insurrection.xsl,v 1.29 2005/10/04 19:00:44 mksoft Exp $">
                   <!-- Do we really want to say Atom is valid XML since it has no DTD?
                   <a title="Valid XML 1.0!" href="http://validator.w3.​org/check?uri=refere​r">
                     <img style="margin-left: 1em;" align="right" border="0" src="/valid-xml10.png" alt="Valid XML 1.0!"/>

File [changed]: log.cgi
Url: http://insurrection.​tigris.org/source/br​owse/insurrection/sr​c/log.cgi?r1=1.21​&r2=1.22
Delta lines: +4 -2
-------------------
--- log.cgi 20 Jun 2005 14:28:19 -0000 1.21
+++ log.cgi 4 Oct 2005 19:00:44 -0000 1.22
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 #
-# $Id: log.cgi,v 1.21 2005/06/20 14:28:19 mksoft Exp $
+# $Id: log.cgi,v 1.22 2005/10/04 19:00:44 mksoft Exp $
 # Copyright 2004,2005 - Michael Sinz
 #
 # This script handles the display of SVN history/logs
@@ -60,9 +60,11 @@
 {
    ## Get the revision history list so we can count the ones we want
    ## and we can follow renames (actually, copies) through the history
+ ## and use "head" to only get as many as needed...
    my $hcmd = $SVNLOOK_CMD . ' history';
    $hcmd .= ' -r "' . $r1 . '"' if (defined $r1);
    $hcmd .= ' "' . $SVN_BASE . '/' . $rpath . '" "' . $opath . '"';
+ $hcmd .= ' | head -' . ($maxEntries + 3);
    @revs = (`$hcmd` =~ m:(\d+)\s+(/[^\n]*):gso);
    $revcount = @revs / 2;
    $maxEntries = $revcount if (!defined $maxEntries);
@@ -177,6 +179,6 @@
        , '<h3>Log command:</h3>'
        , '<pre>' , $cmd , '</pre>';
 
- &svn_TRAILER('$Id: log.cgi,v 1.21 2005/06/20 14:28:19 mksoft Exp $');
+ &svn_TRAILER('$Id: log.cgi,v 1.22 2005/10/04 19:00:44 mksoft Exp $');
 }
 

File [added]: ls.cgi
Url: http://insurrection.​tigris.org/source/br​owse/insurrection/sr​c/ls.cgi?rev=1.1​&content-type=text/v​nd.viewcvs-markup
Added lines: 0
--------------

File [added]: ls.dtd
Url: http://insurrection.​tigris.org/source/br​owse/insurrection/sr​c/ls.dtd?rev=1.1​&content-type=text/v​nd.viewcvs-markup
Added lines: 0
--------------

File [changed]: styles.css
Url: http://insurrection.​tigris.org/source/br​owse/insurrection/sr​c/styles.css?r1=1.46​&r2=1.47
Delta lines: +12 -1
--------------------
--- styles.css 21 Jun 2005 12:26:16 -0000 1.46
+++ styles.css 4 Oct 2005 19:00:44 -0000 1.47
@@ -1,5 +1,5 @@
 /*
- * $Id: styles.css,v 1.46 2005/06/21 12:26:16 mksoft Exp $
+ * $Id: styles.css,v 1.47 2005/10/04 19:00:44 mksoft Exp $
  * Copyright 2004,2005 - Michael Sinz
  */
 
@@ -165,6 +165,17 @@
 {
   width: 99%;
   white-space: nowrap;
+}
+
+.revinfo
+{
+ float: right;
+ color: rgb(35%,35%,35%);
+ font-size: 80%;
+ font-weight: normal;
+ text-decoration: none;
+ margin-left: 0.4em;
+ margin-right: 0.4em;
 }
 
 .svnentryicon

File [changed]: svnindex.js
Url: http://insurrection.​tigris.org/source/br​owse/insurrection/sr​c/svnindex.js?r1=1.2​0&r2=1.21
Delta lines: +50 -1
--------------------
--- svnindex.js 20 Jun 2005 14:28:19 -0000 1.20
+++ svnindex.js 4 Oct 2005 19:00:44 -0000 1.21
@@ -1,5 +1,5 @@
 /*
- * $Id: svnindex.js,v 1.20 2005/06/20 14:28:19 mksoft Exp $
+ * $Id: svnindex.js,v 1.21 2005/10/04 19:00:44 mksoft Exp $
  * Copyright 2004,2005 - Michael Sinz
  *
  * Some JavaScript support routines for the svn index pages
@@ -216,6 +216,10 @@
             td.appendChild(a);
             div = document.createElement('div');
             div.className = 'dir';
+
+ // Get the detail info if available...
+ addRevInfo(div,action);
+
             a.appendChild(div);
             img = document.createElement('img');
             div.appendChild(img);
@@ -249,6 +253,10 @@
             td.appendChild(a);
             div = document.createElement('div');
             div.className = 'file';
+
+ // Get the detail info if available...
+ addRevInfo(div,action);
+
             a.appendChild(div);
             img = document.createElement('img');
             div.appendChild(img);
@@ -320,6 +328,31 @@
 }
 
 /*
+ * This common bit of code will conditionally add the
+ * extended revision info if it is in the action item.
+ */
+function addRevInfo(a,action)
+{
+ if (action.rev)
+ {
+ var span = document.createElement('span');
+ span.className = 'revinfo';
+ span.appendChild(doc​ument.createTextNode​(action.date));
+ a.appendChild(span);
+
+ span = document.createElement('span');
+ span.className = 'revinfo';
+ span.appendChild(doc​ument.createTextNode​('r' + action.rev));
+ a.appendChild(span);
+
+ span = document.createElement('span');
+ span.className = 'revinfo';
+ span.appendChild(doc​ument.createTextNode​(action.author));
+ a.appendChild(span);
+ }
+}
+
+/*
  * Given a target object and the completed XMLHttpRequest
  * object, this builds the job list for showing the directory.
  */
@@ -356,6 +389,14 @@
         action.type = 'dir';
         action.name = dirs[i].getAttribute('name');
         action.href = dirs[i].getAttribute('href');
+
+ // In case the extended data is available, add it too...
+ if (dirs[i].getAttribut​e('revision'))
+ {
+ action.rev = dirs[i].getAttribute​('revision');
+ action.author = dirs[i].getAttribute('author');
+ action.date = dirs[i].getAttribute('date');
+ }
         actionList.push(action);
     }
 
@@ -368,6 +409,14 @@
         action.type = 'file';
         action.name = files[i].getAttribute('name');
         action.href = files[i].getAttribute('href');
+
+ // In case the extended data is available, add it too...
+ if (files[i].getAttribu​te('revision'))
+ {
+ action.rev = files[i].getAttribut​e('revision');
+ action.author = files[i].getAttribut​e('author');
+ action.date = files[i].getAttribute('date');
+ }
         actionList.push(action);
     }

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /insurrection/src/ mksoft Michae Sinz 2005-10-04 12:00:46 PDT
Messages per page: