source@mandoc.bsd.lv
 help / color / Atom feed
* cvsweb: Delete cvsgraph support.
@ 2019-11-11 14:38 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-11-11 14:38 UTC (permalink / raw)
  To: source

Log Message:
-----------
Delete cvsgraph support.  It looks like abandonware upstream,
and about the first think the author says is "hey, I like a hack".
Such software is hardly adequate in a CGI context, and besides,
the functionality is poorly thought-out and mostly useless.

Modified Files:
--------------
    cvsweb:
        INSTALL
        README
        cvsweb.cgi
        cvsweb.conf
    cvsweb/css:
        cvsweb.css

Removed Files:
-------------
    cvsweb/icons:
        minigraph.png

Revision Data
-------------
Index: cvsweb.cgi
===================================================================
RCS file: /home/cvs/mandoc/cvsweb/cvsweb.cgi,v
retrieving revision 4.17
retrieving revision 4.18
diff -Lcvsweb.cgi -Lcvsweb.cgi -u -p -r4.17 -r4.18
--- cvsweb.cgi
+++ cvsweb.cgi
@@ -69,13 +69,13 @@ use vars qw (
   %input $query $barequery $sortby $bydate $byrev $byauthor
   $bylog $byfile $defaultDiffType $logsort $cvstree $cvsroot
   $charset $output_filter
-  @command_path %CMD $allow_compress $backicon $diricon $fileicon $graphicon
+  @command_path %CMD $allow_compress $backicon $diricon $fileicon
   $fullname $cvstreedefault $logo $defaulttitle $address $binfileicon
   $long_intro $short_instruction $shortLogLen $show_author
   $tablepadding $hr_breakable $showfunc $hr_ignwhite $hr_ignkeysubst
   $inputTextSize $mime_types $allow_annotate $allow_markup $allow_mailtos
   $allow_log_extra $allow_dir_extra $allow_source_extra
-  $allow_cvsgraph $cvsgraph_config $edit_option_form
+  $edit_option_form
   $show_subdir_lastmod $show_log_in_markup $preformat_in_markup
   $tabstop $state $annTable $sel @ForbiddenFiles
   $use_descriptions %descriptions @mytz $dwhere
@@ -158,8 +158,6 @@ sub openOutputFilter();
 sub doAnnotate($$);
 sub doCheckout($$$);
 sub doEnscript($$$;$);
-sub doGraph();
-sub doGraphView();
 sub cvswebMarkup($$$$$$;$);
 sub viewable($);
 sub doDiff($$$$$$);
@@ -180,7 +178,6 @@ sub download_url($$;$);
 sub download_link($$$;$);
 sub display_url($$;$);
 sub display_link($$;$$);
-sub graph_link($;$);
 sub history_link($$;$);
 sub toggleQuery($;$);
 sub htmlquote($);
@@ -213,8 +210,8 @@ $cvstreedefault = $logo = $defaulttitle 
   $hr_ignkeysubst = $inputTextSize = $mime_types = $allow_annotate =
   $allow_markup = $allow_compress = $edit_option_form =
   $show_subdir_lastmod = $show_log_in_markup = $preformat_in_markup =
-  $tabstop = $use_moddate = $gzip_open = $DEBUG = $allow_cvsgraph =
-  $cvsgraph_config = $cvshistory_url = $allow_tar = undef;
+  $tabstop = $use_moddate = $gzip_open = $DEBUG =
+  $cvshistory_url = $allow_tar = undef;
 
 $allow_version_select = $allow_mailtos = $allow_log_extra = 1;
 
@@ -373,8 +370,8 @@ if (defined($ENV{QUERY_STRING})) {
 undef %input;
 
 my $t;
-for my $p (qw(graph hideattic hidecvsroot hidenonreadable ignorecase ln copt
-              makeimage options tarball)) {
+for my $p (qw(hideattic hidecvsroot hidenonreadable ignorecase ln copt
+              options tarball)) {
   $t = $query{$p};
   if (defined($t)) {
     ($input{$p}) = ($t =~ /^([01]|on)$/)
@@ -1056,12 +1053,11 @@ EOF
       $filesfound++;
 
       printf "<tr class=\"%s\">\n", ($dirrow % 2) ? 'even' : 'odd';
-      printf '<td class="file"%s>', $allow_cvsgraph ? '' : ' colspan="2"';
+      printf '<td class="file" colspan="2">';
 
       my $icon = $isbinary ? $binfileicon : $fileicon;
       print $nofilelinks ? $icon : &link($icon, $url);
       print '&nbsp;', &link(htmlquote($file), $url), $attic;
-      print '</td><td class="graph">', graph_link($fileurl) if $allow_cvsgraph;
       print "</td>\n<td width=\"30\">", display_link($fileurl, $rev);
       my $ageclass = 'age';
       my $age      = '';
@@ -1285,16 +1281,6 @@ elsif (-f $fullname . ',v') {
     exit;
   }
 
-  if ($allow_cvsgraph && $input{graph}) {
-    if ($input{makeimage}) {
-      doGraph();
-    } else {
-      doGraphView();
-    }
-    gzipclose();
-    exit;
-  }
-
   &doLog($fullname);
 }
 
@@ -2912,8 +2898,6 @@ sub printLog($$$;$$)
                             $fileurl, $_, $barequery, $_));
       }
     }
-    print ' - ', graph_link('', 'revision graph')
-      if (!$inlogview && $allow_cvsgraph);
   }
   print "<br />\n";
 
@@ -3046,89 +3030,6 @@ sub printLog($$$;$$)
 }
 
 
-#
-# Generates the HTML view for CvsGraph.
-#
-sub doGraphView()
-{
-  (my $pathname = $where) =~ s|[^/]*$||;
-  (my $filename = $where) =~ s|^.*/||;
-
-  navigateHeader($scriptwhere, $pathname, $filename, undef, 'graph');
-
-  my $title = 'Revision graph of ' . htmlquote($pathname . $filename);
-  my $mapname = 'CvsGraphMap';
-
-  printf(<<EOF, $title, $mapname, $cvstree, $title);
-<h3 style="text-align: center">%s</h3>
-<div style="text-align: center"><img border="0" usemap="#%s" src="?cvsroot=%s;graph=1;makeimage=1" alt="%s" />
-EOF
-
-  # Remove any pre-existing tag/branch names from branch links.
-  (my $notag_query = $barequery) =~ s/;+only_with_tag=.*?(?=;|$)//g;
-
-  my @graph_cmd =
-    ($CMD{cvsgraph},
-     '-r', $cvsroot,
-     '-m', $pathname,
-     '-i',
-     '-M', $mapname,
-     '-x', 'x',
-     "-Omap_branch_href=\"href=\\\"./?only_with_tag=%(%t%)$notag_query\\\"\"",
-     "-Omap_rev_href=\"href=\\\"?rev=%(%R%)$barequery\\\"\"",
-     "-Omap_diff_href=\"href=\\\"%(%F%).diff" .
-     "?r1=%(%P%);r2=%(%R%)$barequery\\\"\"",
-     );
-  push(@graph_cmd, '-c', $cvsgraph_config) if $cvsgraph_config;
-  push(@graph_cmd, $filename . ',v');
-
-  local *CVSGRAPH_OUT;
-  my ($h, $err) =
-    startproc(\@graph_cmd, \"", '>pipe', \*CVSGRAPH_OUT);
-  fatal('500 Internal Error', $err) unless $h;
-
-  # Browser compatibility kludge: many browsers do not support client side
-  # image maps where the <map> element contains only the id attribute.  Let's
-  # add the corresponding name attribute to it on the fly.
-  while (<CVSGRAPH_OUT>) {
-    s/(<map\s+id="([^"]+)")\s*>/$1 name="$2">/;
-    print;
-  }
-
-  $h->finish();
-  print "</div>\n";
-
-  html_footer();
-}
-
-
-#
-# Generates a graph using CvsGraph.
-#
-sub doGraph()
-{
-  (my $pathname = $where) =~ s|[^/]*$||;
-  (my $filename = $where) =~ s|^.*/||;
-
-  http_header('image/png');
-
-  my @graph_cmd = ($CMD{cvsgraph}, '-r', $cvsroot, '-m', $pathname);
-  push(@graph_cmd, '-c', $cvsgraph_config) if $cvsgraph_config;
-  push(@graph_cmd, $filename . ',v');
-
-  local *CVSGRAPH_OUT;
-  my ($h, $err) =
-    startproc(\@graph_cmd, \"", '>pipe', \*CVSGRAPH_OUT);
-  fatal('500 Internal Error', $err) unless $h;
-  {
-    local $/ = undef;
-    binmode(\*STDOUT);
-    print <CVSGRAPH_OUT>;
-  }
-  $h->finish();
-}
-
-
 sub doLog($)
 {
   my ($fullname) = @_;
@@ -3153,8 +3054,6 @@ sub doLog($)
     &clickablePath($upwhere, 1), "</b>\n</p>\n";
   print "<p>\n ";
   print &link('Request diff between arbitrary revisions', '#diff');
-  print ' - ', &graph_link('', 'Display revisions graphically')
-    if $allow_cvsgraph;
   if ($cvshistory_url) {
     (my $d = $upwhere) =~ s|/+$||;
     print ' - ', history_link($d, $filename);
@@ -3919,17 +3818,6 @@ sub display_link($$;$$)
   return sprintf('<a href="%s" class="display-link">%s</a>',
                  display_url($url, $revision, $mtype) . $barequery,
                  htmlquote($textlink));
-}
-
-#
-# Expects the passed in URL to be URI escaped, and without a query string.
-# The passed in link text should be already HTML escaped as appropriate.
-#
-sub graph_link($;$)
-{
-  my ($url, $text) = @_;
-  $text ||= $graphicon;
-  return sprintf('<a href="%s?graph=1%s">%s</a>', $url, $barequery, $text);
 }
 
 #
Index: README
===================================================================
RCS file: /home/cvs/mandoc/cvsweb/README,v
retrieving revision 4.4
retrieving revision 4.5
diff -LREADME -LREADME -u -p -r4.4 -r4.5
--- README
+++ README
@@ -87,8 +87,6 @@ o Security fixes to let it work under pe
 
 o Annotate works under mod_perl and against a read only repository.
 
-o CvsGraph <http://www.akhphd.au.dk/~bertho/cvsgraph/> integration.
-
 o Syntax highlighting using GNU Enscript <http://www.iki.fi/~mtr/genscript/>.
 
 o CVSHistory <http://www.jamwt.com/CVSHistory/> integration.
Index: INSTALL
===================================================================
RCS file: /home/cvs/mandoc/cvsweb/INSTALL,v
retrieving revision 4.4
retrieving revision 4.5
diff -LINSTALL -LINSTALL -u -p -r4.4 -r4.5
--- INSTALL
+++ INSTALL
@@ -39,9 +39,6 @@ of this document.
    repository (or a copy of it) therefore; rsh, ssh or pserver access
    doesn't work yet.
 
-   Install CvsGraph if you want to use it with CVSweb, and see (6) for
-   configuration notes.  CvsGraph 1.4.0 or newer is required.
-
    Install GNU Enscript if you want syntax highlighting, and see (7) for
    more info.  You'll need version 1.6.3 or newer.
 
@@ -78,11 +75,6 @@ of this document.
 5) Copy cvsweb.css from the css/ directory to a web server directory, and
    point the $cssurl variable in cvsweb.conf to it.
 
-6) CvsGraph <http://www.akhphd.au.dk/~bertho/cvsgraph/> can be used with
-   this version of CVSweb.  See the $allow_cvsgraph and $cvsgraph_config
-   configuration variables in cvsweb.conf.  Note (and install) also the
-   cvsgraph.png icon in the icons/ directory.
-
 7) GNU Enscript <http://www.iki.fi/~mtr/genscript/> can be used for syntax
    highlighting.  To enable it, copy lang_cvsweb.st and lang_cvsweb_diff.st
    from the enscript/ dir to your Enscript "hl" directory (often eg.
@@ -212,16 +204,13 @@ The following configuration variables in
    $allow_enscript, @enscript_options and %enscript_types control the use
    and behavior of enscript(1).
 
-   $allow_cvsgraph and $cvsgraph_config control the use and behavior of
-   cvsgraph(1).
-
    $file_list_len can be set to work around problems with rlog(1) and dirs
    with lots of files.
 
    $cssurl contains the absolute URI to the CSS file to use.
 
-   %ICONS has two new entries: binfile for binary files (-kb keyword
-   substitution) and graph for the cvsgraph icon.
+   %ICONS has a new entry: binfile for binary files (-kb keyword
+   substitution).
 
    %DIFF_COMMANDS is new, it is used to configure external per file type
    diff commands.
Index: cvsweb.conf
===================================================================
RCS file: /home/cvs/mandoc/cvsweb/cvsweb.conf,v
retrieving revision 4.6
retrieving revision 4.7
diff -Lcvsweb.conf -Lcvsweb.conf -u -p -r4.6 -r4.7
--- cvsweb.conf
+++ cvsweb.conf
@@ -20,14 +20,13 @@
 #   cvs, rlog, rcsdiff
 #   gzip (if you enable $allow_compress)
 #   (g)tar, zip (if you enable $allow_tar)
-#   cvsgraph (if you enable $allow_graph)
 #   enscript (if you enable $allow_enscript)
 #
 @command_path = qw(/bin /usr/bin /usr/local/bin);
 
 # Search the above directories for each command (prefer gtar over tar).
 #
-for (qw(cvs rlog rcsdiff gzip gtar zip cvsgraph enscript)) {
+for (qw(cvs rlog rcsdiff gzip gtar zip enscript)) {
 	$CMD{$_} = search_path($_);
 }
 $CMD{tar}   = delete($CMD{gtar}) if $CMD{gtar};
@@ -222,7 +221,6 @@ my $iconsdir = '/icons';
      dir     => [('[DIR]',    "$iconsdir/dir.gif",       20,   22)],
      file    => [('[TXT]',    "$iconsdir/text.gif",      20,   22)],
      binfile => [('[BIN]',    "$iconsdir/binary.gif",    20,   22)],
-     graph   => [('[GRAPH]',  "$iconsdir/minigraph.png", 16,   16)],
 );
 undef $iconsdir;
 
@@ -469,18 +467,6 @@ $use_moddate = 1;
 # Just comment this out if you're not bitten by the problem.
 #
 #$file_list_len = 200;
-
-# Allow graphical representations of file revisions and branches with CvsGraph?
-#
-$allow_cvsgraph = $CMD{cvsgraph} ? 1 : 0;
-
-# Path to the CvsGraph configuration file.  Only used if $allow_cvsgraph
-# is true.  Leave this empty or comment it out to make cvsgraph(1) use its
-# default configuration file.  Note that CVSweb will override some of the
-# settings in the configuration file with command line options, see
-# doGraph() and doGraphView() in cvsweb.cgi for details.
-#
-#$cvsgraph_config = "/etc/cvsgraph.conf";
 
 # URL to the CVSHistory script.  This should be absolute (but does not need
 # to include the host and port if the script is on the same server as
Index: cvsweb.css
===================================================================
RCS file: /home/cvs/mandoc/cvsweb/css/cvsweb.css,v
retrieving revision 4.3
retrieving revision 4.4
diff -Lcss/cvsweb.css -Lcss/cvsweb.css -u -p -r4.3 -r4.4
--- css/cvsweb.css
+++ css/cvsweb.css
@@ -82,13 +82,6 @@ table.dir * tr.odd {
 table.dir * td.file, table.dir * td.dir {
   white-space: nowrap;
 }
-/* Graph link column */
-table.dir * td.graph {
-  padding-left: 3px;
-  padding-right: 3px;
-  text-align: center;
-  width: 1%;
-}
 /* Age column */
 table.dir * td.age {
   color: #000;
Binary files - and /dev/null differ
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 14:38 cvsweb: Delete cvsgraph support schwarze

source@mandoc.bsd.lv

Archives are clonable: git clone --mirror http://inbox.vuxu.org/mandoc-source

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.mandoc.source


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git