summaryrefslogtreecommitdiff
path: root/v4l/scripts/prepare-ChangeLog.pl
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/scripts/prepare-ChangeLog.pl')
-rwxr-xr-x[-rw-r--r--]v4l/scripts/prepare-ChangeLog.pl25
1 files changed, 15 insertions, 10 deletions
diff --git a/v4l/scripts/prepare-ChangeLog.pl b/v4l/scripts/prepare-ChangeLog.pl
index 087e94bf2..c3b253246 100644..100755
--- a/v4l/scripts/prepare-ChangeLog.pl
+++ b/v4l/scripts/prepare-ChangeLog.pl
@@ -2,7 +2,7 @@
# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 2 -*-
# Perl script to create a ChangeLog entry with names of files
-# and functions from a cvs diff.
+# and functions from a hg diff.
#
# Darin Adler <darin@eazel.com>, started 20 April 2000
# Java support added by Maciej Stachowiak <mjs@eazel.com>
@@ -13,6 +13,10 @@
# CHANVE_LOG Env variables now are mandatory.
# Updated at 15 January 2005
#
+# Mauro Carvalho Chehab <mchehab@brturbo.com.br>: modified to
+# work with Mercurial
+# Updated at 29 August 2005
+#
# (Someone put a license in here, like maybe GPL.)
#
# TODO:
@@ -77,26 +81,27 @@ if (!defined $login)
# Read the old change log file.
# It's less efficient to read the whole thing into memory than it would be
# to read it while we prepend to it later, but I like doing this part first.
-print STDERR " Updating ChangeLog from cvs repository.\n";
-open ERRORS, "cvs update v4l/ChangeLog |" or die "The cvs update of ChangeLog failed: $OS_ERROR.\n";
-print STDERR " $ARG" while <ERRORS>;
-close ERRORS;
+#print STDERR " Updating ChangeLog from hg repository.\n";
+#open ERRORS, "hg update ChangeLog |" or die "The hg update of ChangeLog failed: $OS_ERROR.\n";
+#print STDERR " $ARG" while <ERRORS>;
+#close ERRORS;
open OLD_CHANGE_LOG, "v4l/ChangeLog" or die "Could not open ChangeLog file: $OS_ERROR.\n";
my @old_change_log = <OLD_CHANGE_LOG>;
close OLD_CHANGE_LOG;
# For each file, build a list of modified lines.
# Use line numbers from the "after" side of each diff.
-print STDERR " Running cvs diff to find changes.\n";
+print STDERR " Running hg diff to find changes.\n";
my %changed_line_ranges;
my $file;
-open DIFF, "cvs -fq diff -N |" or die "The cvs diff failed: $OS_ERROR.\n";
+open DIFF, "hg diff |" or die "The hg diff failed: $OS_ERROR.\n";
while (<DIFF>)
{
- $file = $1 if /^Index: (\S+)$/;
+#diff -r faaf1cf8404a video4linux/scripts/prepare-ChangeLog.pl
+# and (/^\d+(,\d+)?[acd](\d+)(,(\d+))?/ or /^Binary files/) )
+ $file = $1 if /^diff -r .* (\S+)$/;
if (defined $file
- and $file ne "v4l/ChangeLog"
- and (/^\d+(,\d+)?[acd](\d+)(,(\d+))?/ or /^Binary files/) )
+ and $file ne "v4l/ChangeLog" )
{
push @{$changed_line_ranges{$file}}, [ $2, $4 || $2 ];
}