From mmcgrath@redhat.com Fri Jun 5 03:16:25 2015 From: Mike McGrath To: infrastructure@lists.fedoraproject.org Subject: Re: [PATCH/RFC] viewvc: Add a note that CVS is read-only Date: Thu, 12 Aug 2010 10:38:47 -0500 Message-ID: In-Reply-To: <20100812153316.GD4925@inocybe.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2015557636755093692==" --===============2015557636755093692== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable +1 from me. Though this may need to be coordinated with notting's patch :) -Mike On Thu, 12 Aug 2010, Todd Zullinger wrote: > While we redirect cvs.fedoraproject.org to pkgs.fedoraproject.org, > specific URL's are not redirected (and probably should not be). Adding > a large note to the viewvc header template should make it more obvious > that CVS is not being updated anymore. > --- > > 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 =3D=3D 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. > > modules/viewvc/files/viewvc/header.ezt | 24 ++++++++++++++++++++++++ > modules/viewvc/manifests/init.pp | 6 ++++++ > 2 files changed, 30 insertions(+), 0 deletions(-) > create mode 100644 modules/viewvc/files/viewvc/header.ezt > > diff --git a/modules/viewvc/files/viewvc/header.ezt b/modules/viewvc/files/= viewvc/header.ezt > new file mode 100644 > index 0000000..96bd5a2 > --- /dev/null > +++ b/modules/viewvc/files/viewvc/header.ezt > @@ -0,0 +1,24 @@ > + + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > + > + > + > + [if-any rootname][[][rootname]][else]ViewVC[end] [page_title]</ti= tle> > + <meta name=3D"generator" content=3D"ViewVC [vsn]" /> > + <link rel=3D"shortcut icon" href=3D"[docroot]/images/favicon.ico" /> > + <link rel=3D"stylesheet" href=3D"[docroot]/styles.css" type=3D"text/css"= /> > + [if-any rss_href]<link rel=3D"alternate" type=3D"application/rss+xml" ti= tle=3D"RSS [[][rootname]][where]" href=3D"[rss_href]" />[end] > +</head> > +<body> > +<h2>NOTE: CVS is now read-only. See <a href=3D"http://pkgs.fedoraproject.= org/gitweb/">gitweb</a> for current changes.</h2> > +<div class=3D"vc_navheader"> > +<table><tr> > +<td><strong>[if-any roots_href]<a href=3D"[roots_href]"><span class=3D"pat= hdiv">/</span></a>[else]<span class=3D"pathdiv">/</span>[end][if-any nav_path= ][for nav_path][if-any nav_path.href]<a href=3D"[nav_path.href]">[end][if-ind= ex nav_path first][[][nav_path.name]][else][nav_path.name][end][if-any nav_pa= th.href]</a>[end][if-index nav_path last][else]<span class=3D"pathdiv">/</spa= n>[end][end][end]</strong></td> > +<td style=3D"text-align: right;">[if-any username]Logged in as: <strong>[u= sername]</strong>[end]</td> > +</tr></table> > +</div> > + > +<div style=3D"float: right; padding: 5px;"><a href=3D"http://www.viewvc.or= g/" title=3D"ViewVC Home"><img src=3D"[docroot]/images/viewvc-logo.png" alt= =3D"ViewVC logotype" width=3D"240" height=3D"70" /></a></div> > +<h1>[page_title]</h1> > + > + > diff --git a/modules/viewvc/manifests/init.pp b/modules/viewvc/manifests/in= it.pp > index 08617ea..426458d 100644 > --- a/modules/viewvc/manifests/init.pp > +++ b/modules/viewvc/manifests/init.pp > @@ -16,4 +16,10 @@ class viewvc::web { > mode =3D> 0644, > require =3D> Package['viewvc'] > } > + > + file { '/usr/share/viewvc/templates/include/header.ezt': > + source =3D> 'puppet:///viewvc/viewvc/header.ezt', > + mode =3D> 0644, > + require =3D> Package['viewvc'] > + } > } > -- > 1.7.2.1 > > -- > Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > I never forget a face, but in your case I'll be glad to make an > exception. > -- Groucho Marx > > _______________________________________________ > infrastructure mailing list > infrastructure(a)lists.fedoraproject.org > https://admin.fedoraproject.org/mailman/listinfo/infrastructure > --===============2015557636755093692==--