From 6950913ba0aee167720feed93e81591ece69bf8e Mon Sep 17 00:00:00 2001 From: joe Date: Mon, 24 Sep 2001 11:19:51 +0000 Subject: When working out what the previous revision was, for producing the delta for a removed file for instance, take into account branch points. --- CVSROOT/log_accum.pl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'CVSROOT') diff --git a/CVSROOT/log_accum.pl b/CVSROOT/log_accum.pl index 37650ce6e2fa..89494c1e7698 100755 --- a/CVSROOT/log_accum.pl +++ b/CVSROOT/log_accum.pl @@ -329,10 +329,18 @@ sub change_summary_removed { $rcsfile =~ s|/Attic/|/|; # Remove 'Attic/' if present. if ($rev and $rcsfile) { - $rev =~ /(.*)\.([^\.]+)$/; - my $oldrev = "$1." . ($2 - 1); + $rev =~ /(?:(.*)\.)?([^\.]+)\.([^\.]+)$/; + my ($base, $r1, $r2) = ($1, $2, $3); - my $lines = count_lines_in_revision($file, $oldrev); + my $prevrev = ""; + if ($r2 == 1) { + $prevrev = $base; + } else { + $prevrev = "$base." if $base; + $prevrev .= "$r1." . ($r2 - 1); + } + + my $lines = count_lines_in_revision($file, $prevrev); $delta = "+0 -$lines"; } -- cgit