[PATCH/RFC] viewvc: Add a note that CVS is read-only

Todd Zullinger tmz at pobox.com
Thu Aug 12 15:59:38 UTC 2010


I wrote:
> This is an RFC, because there is potential room for improvement here.
> While the default cvsroot for viewvc is pkgs, there are still other
> cvsroots accessible via viewvc and I'm not sure if all of them are
> read-only.  I doubt they are.
>
> The question is whether having the note in the header for all cvsroots
> is a bad thing and if anyone knows the viewvc ezt template system well
> enough to make it only show up when rootname == pkgs.  It seems like
> it may be possible to do this, but I don't know the ezt syntax to make
> that happen.  Help would be most welcome, if the general idea here is
> sound and someone else is bored or curious enough to give it a try.

Doing this bit may be as simple as:

diff --git i/modules/viewvc/files/viewvc/header.ezt w/modules/viewvc/files/viewvc/header.ezt
index 96bd5a2..942983c 100644
--- i/modules/viewvc/files/viewvc/header.ezt
+++ w/modules/viewvc/files/viewvc/header.ezt
@@ -10,7 +10,11 @@
   [if-any rss_href]<link rel="alternate" type="application/rss+xml" title="RSS [[][rootname]][where]" href="[rss_href]" />[end]
 </head>
 <body>
+[if-any rootname]
+    [is rootname "pkgs"]
 <h2>NOTE: CVS is now read-only.  See <a href="http://pkgs.fedoraproject.org/gitweb/">gitweb</a> for current changes.</h2>
+    [end]
+[end]
 <div class="vc_navheader">
 <table><tr>
 <td><strong>[if-any roots_href]<a href="[roots_href]"><span class="pathdiv">/</span></a>[else]<span class="pathdiv">/</span>[end][if-any nav_path][for nav_path][if-any nav_path.href]<a href="[nav_path.href]">[end][if-index nav_path first][[][nav_path.name]][else][nav_path.name][end][if-any nav_path.href]</a>[end][if-index nav_path last][else]<span class="pathdiv">/</span>[end][end][end]</strong></td>

But I don't have a multi-root viewvc at hand to test against.

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If the triangles were to make a God they would give him three sides.
    -- Montesquieu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20100812/029a1398/attachment.bin 


More information about the infrastructure mailing list