-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgnuify-changelog.pl
executable file
·44 lines (38 loc) · 1.52 KB
/
gnuify-changelog.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/perl -w
# a script to munge the output of 'svn log' into something approaching the
# style of a GNU ChangeLog.
#
# to use this, just fill in the 'hackers' hash with the usernames and
# name/emails of the people who work on your project, go to the top level
# of your working copy, and run:
#
# $ svn log | /path/to/gnuify-changelog.pl > ChangeLog
%hackers = ( "tkng" => 'TOKUNAGA Hiroyuki <[email protected]>',
"yusuke" => 'Yusuke TABATA <[email protected]>',
"yamaken" => 'YAMAMOTO Kengo / YamaKen <[email protected]>',
"omote" => 'Masahito Omote <[email protected]>',
"kzk" => 'kzk <[email protected]>',
"makeinu" => 'Takuro Ashie <[email protected]>',
"ekato" => 'Etsushi Kato <[email protected]>',
"yamamoto" => 'Masanari Yamamoto <[email protected]>',
"jun0" => 'Jun Inoue <[email protected]>',
"nosuke" => 'Konosuke Watanabe <[email protected]>',
"jhpark" => 'Jae-hyeon Park <[email protected]>',
);
$parse_next_line = 0;
while (<>) {
# axe windows style line endings, since we should try to be consistent, and
# the repos has both styles in it's log entries.
$_ =~ s/\r\n$/\n/;
if (/^-+$/) {
# we're at the start of a log entry, so we need to parse the next line
$parse_next_line = 1;
} elsif ($parse_next_line) {
# transform from svn style to GNU style
$parse_next_line = 0;
@parts = split (/ /, $_);
print "$parts[4] $hackers{$parts[2]}\n";
} else {
print "\t$_";
}
}