Date: Fri, 06 May 2005 13:31:50 +0300 From: Ville =?ISO-8859-1?Q?Skytt=E4?= <scop@FreeBSD.org> To: freebsd-cvsweb@freebsd.org Subject: Re: Log view diff line Message-ID: <1115375510.17931.38.camel@bobcat.mine.nu> In-Reply-To: <3bccd73d05050514095645d09e@mail.gmail.com> References: <3bccd73d05050514095645d09e@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Thu, 2005-05-05 at 14:09 -0700, Jerry Nairn wrote:
> Suggested changes to diff links in the log view:
>
> On the four lines which have:
>
> $diff = ''; $printed = 1;
>
> I have changed it to:
>
> $diff = ','; $printed = 1;
>
> I feel it is clearer with the separator in it. Other characters or
> combinations of characters might be better.
Agreed.
> I changed the string ' next main ' to ' to next main ' to be
> consistent with the other links, ' to previous ' and ' to branchpoint
> '.
Good catch.
Thoughts about the attached patch? It uses a semicolon for separating
the diff link "categories", moves the "to" to be only at the beginning
of the line, and adds parens around the displayed revision numbers. I'm
not sure if the parens add any value though.
[-- Attachment #2 --]
Index: cvsweb.cgi
===================================================================
RCS file: /home/projcvs/projects/cvsweb/cvsweb.cgi,v
retrieving revision 1.292
diff -u -r1.292 cvsweb.cgi
--- cvsweb.cgi 11 Apr 2005 17:47:38 -0000 1.292
+++ cvsweb.cgi 6 May 2005 10:26:20 -0000
@@ -2984,7 +2984,7 @@
my %diffrev = ();
$diffrev{$_} = 1;
$diffrev{""} = 1;
- my $diff = 'Diff';
+ my $diff = 'Diff to:';
my $printed = 0;
#
@@ -2994,8 +2994,8 @@
my $url =
sprintf('%s.diff?r1=%s;r2=%s%s', $fileurl, $prev, $_, $barequery);
if (my @dlinks = getDiffLinks($url, $mimetype, $isbin)) {
- print $diff, ' to previous ', $prev, ': ', join(', ', @dlinks);
- $diff = ''; $printed = 1;
+ print $diff, ' previous (', $prev, '): ', join(', ', @dlinks);
+ $diff = ';'; $printed = 1;
}
}
@@ -3009,8 +3009,8 @@
my $url =
sprintf('%s.diff?r1=%s;r2=%s%s', $fileurl, $brp, $_, $barequery);
if (my @dlinks = getDiffLinks($url, $mimetype, $isbin)) {
- print $diff, ' to branchpoint ', $brp, ': ', join(', ', @dlinks);
- $diff = ''; $printed = 1;
+ print $diff, ' branchpoint (', $brp, '): ', join(', ', @dlinks);
+ $diff = ';'; $printed = 1;
}
}
@@ -3035,7 +3035,7 @@
}
# Only the highest version on a branch should have
- # a diff for the "next main".
+ # a diff for the "next MAIN".
last
if (@tmp1 - 1 <= @tmp2
&& join (".", @tmp1[0 .. $#tmp1 - 1]) eq
@@ -3047,8 +3047,8 @@
my $url = sprintf('%s.diff?r1=%s;r2=%s%s',
$fileurl, $nextmain, $_, $barequery);
if (my @dlinks = getDiffLinks($url, $mimetype, $isbin)) {
- print $diff, ' next main ', $nextmain, ': ', join(', ', @dlinks);
- $diff = ''; $printed = 1;
+ print $diff, ' next MAIN (', $nextmain, '): ', join(', ', @dlinks);
+ $diff = ';'; $printed = 1;
}
}
}
@@ -3060,8 +3060,8 @@
my $url = sprintf('%s.diff?r1=%s;r2=%s%s',
$fileurl, $input{r1}, $_, $barequery);
if (my @dlinks = getDiffLinks($url, $mimetype, $isbin)) {
- print $diff, ' to selected ', $input{r1}, ': ', join(', ', @dlinks);
- $diff = ''; $printed = 1;
+ print $diff, ' selected (', $input{r1}, '): ', join(', ', @dlinks);
+ $diff = ';'; $printed = 1;
}
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1115375510.17931.38.camel>
