diff options
author | joe <joe@FreeBSD.org> | 2001-09-24 19:19:51 +0800 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2001-09-24 19:19:51 +0800 |
commit | 6950913ba0aee167720feed93e81591ece69bf8e (patch) | |
tree | ea47cef0f235f18e69b7fe19563c5ffafd5dfa8e /CVSROOT | |
parent | f66e433b37ba3c2fc52ae2e28c04c1b90975fada (diff) | |
download | freebsd-ports-gnome-6950913ba0aee167720feed93e81591ece69bf8e.tar.gz freebsd-ports-gnome-6950913ba0aee167720feed93e81591ece69bf8e.tar.zst freebsd-ports-gnome-6950913ba0aee167720feed93e81591ece69bf8e.zip |
When working out what the previous revision was, for producing the
delta for a removed file for instance, take into account branch
points.
Diffstat (limited to 'CVSROOT')
-rwxr-xr-x | CVSROOT/log_accum.pl | 14 |
1 files changed, 11 insertions, 3 deletions
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"; } |