[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Bug in ./tools/dev/gnuify-changelog.pl

From: Kieran <kieran_at_esperi.demon.co.uk>
Date: 2002-07-25 14:33:25 CEST

Problem:

The perlscript gnuify-changelog.pl is not correctly parsing the output
of "svn log".

Testcase:
In a fresh build, after
$ ./configure --enable-maintainer-mode --disable-shared; make; make \
check
$ chmod u+x tools/dev/gnuify-changelog.pl
$ cd subversion/clients/cmdline/; chmod u+x svn
$ ./svn log
-r 2497 | ../../../tools/dev/gnuify-changelog.pl
Use of uninitialized value in concatenation (.) or string at
../../../tools/dev/gnuify-changelog.pl line 67, <> line 2.
(Sat,--01:21:19 Philip Martin <philip@codematters.co.uk>

        * subversion/clients/cmdline/util.c
(svn_cl__make_log_msg_baton): Always
          initialise message_encoding.

(Sorry about line wrapping, but you get the idea...)

Patch:

The following change appears to fix this trivial problem. (I've
taken the gnu fileutils changelog at my benchmark)

--- gnuify-changelog.pl Thu Jul 25 13:02:12 2002
+++ gnuify-changelog.pl Thu Jul 25 13:27:37 2002
@@ -35,19 +35,6 @@
              "rassilon" => 'Bill Tutt <rassilon@lyra.org>',
              "kbohling" => 'Kirby C. Bohling
<kbohling@birddog.com>', );

-%months = ( "Jan" => "01",
- "Feb" => "02",
- "Mar" => "03",
- "Apr" => "04",
- "May" => "05",
- "Jun" => "06",
- "Jul" => "07",
- "Aug" => "08",
- "Sep" => "09",
- "Oct" => "10",
- "Nov" => "11",
- "Dec" => "12", );
-
 $parse_next_line = 0;

 while (<>) {
@@ -64,9 +51,8 @@

     @parts = split (/ /, $_);

- print "$parts[8]-$months{$parts[7]}-$parts[6]
$hackers{$parts[3]}\n";
+ print "$parts[5] $hackers{$parts[3]}\n";
   } else {
     print "\t$_";
   }
 }
-

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 25 14:34:23 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.