[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/contrib log_accum.pl
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/contrib log_accum.pl |
Date: |
Thu, 11 May 2006 23:22:15 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Branch:
Changes by: Derek Robert Price <address@hidden> 06/05/11 23:22:15
Modified files:
contrib : log_accum.pl
Log message:
* log_accum.pl: Gradually restoring functionality.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/contrib/log_accum.pl.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
Patches:
Index: ccvs/contrib/log_accum.pl
diff -u ccvs/contrib/log_accum.pl:1.21 ccvs/contrib/log_accum.pl:1.22
--- ccvs/contrib/log_accum.pl:1.21 Thu May 11 23:10:32 2006
+++ ccvs/contrib/log_accum.pl Thu May 11 23:22:15 2006
@@ -648,7 +648,7 @@
# Return an array containing file names and file name roots:
-# (LAST_FILE, LOG_BASE, BRANCH_FILE, ADDED_BASE, CHANGED_BASE,
+# (LAST_FILE, LOG_BASE, BRANCH_BASE, ADDED_BASE, CHANGED_BASE,
# REMOVED_BASE, URL_BASE)
sub get_temp_files
{
@@ -671,9 +671,8 @@
my ($toplevel, $dir, @files) = @_;
my @lines;
- $dir =~ s#^(\./)*\Q$toplevel\E(?=/|$)#.#;
- $dir =~ s#^(\./)*##;
- $dir =~ s#/*$##;
+ $dir =~ s#^\Q$toplevel\E/##;
+ $dir =~ s#/$##;
$dir = "." if $dir eq "";
my $format = "\t%-";
@@ -844,7 +843,13 @@
if (@files)
{
open FILE, ">>$filename" or die "Cannot open file $filename: $!";
+
+ # Normalize $dir, removing ./ indirections and condensing consecutive
+ # slashes.
+ $dir =~ s#(^|/)(\./)+#$1#g;
+ $dir =~ s#//+#/#g;
print FILE $dir, "/\n";
+
print FILE join ("\n", @files), "\n";
close FILE;
}
@@ -948,7 +953,7 @@
$module =~ m#^([^/]*)#;
my $toplevel = $1;
- my ($LAST_FILE, $LOG_BASE, $BRANCH_FILE, $ADDED_BASE, $CHANGED_BASE,
+ my ($LAST_FILE, $LOG_BASE, $BRANCH_BASE, $ADDED_BASE, $CHANGED_BASE,
$REMOVED_BASE, $URL_BASE) = get_temp_files $TMPDIR, $temp_name, $id;
# Set defaults that could have been overridden on the command line.
@@ -995,7 +1000,7 @@
#
write_logfile "$LOG_BASE.$i", @$log_lines
if !-e "$LOG_BASE.$i" or address@hidden;
- append_to_file "$BRANCH_FILE.$i", $module, @$branch_lines;
+ append_to_file "$BRANCH_BASE.$i", $module, @$branch_lines;
append_to_file "$ADDED_BASE.$i", $module, @$added_files;
append_to_file "$CHANGED_BASE.$i", $module, @$changed_files;
append_to_file "$REMOVED_BASE.$i", $module, @$removed_files;