mirror of
https://github.com/curl/curl.git
synced 2025-09-16 17:12:43 +03:00
log2changes.pl: wrap long lines at 80 columns
Also, only use author names in the output. Fixes #9896 Reported-by: John Sherrill Closes #9897
This commit is contained in:
parent
f4912407eb
commit
980510926d
|
@ -37,6 +37,18 @@ sub nicedate {
|
||||||
return $date;
|
return $date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub printmsg {
|
||||||
|
my ($p, $msg)=@_;
|
||||||
|
while(length($msg) > 77) {
|
||||||
|
print $p.substr($msg, 0, 77, "")."\n";
|
||||||
|
$p=" ";
|
||||||
|
}
|
||||||
|
if($msg eq "") {
|
||||||
|
$p = "";
|
||||||
|
}
|
||||||
|
print "$p$msg\n";
|
||||||
|
}
|
||||||
|
|
||||||
print
|
print
|
||||||
' _ _ ____ _
|
' _ _ ____ _
|
||||||
___| | | | _ \| |
|
___| | | | _ \| |
|
||||||
|
@ -47,7 +59,6 @@ print
|
||||||
Changelog
|
Changelog
|
||||||
';
|
';
|
||||||
|
|
||||||
my $line;
|
|
||||||
my $tag;
|
my $tag;
|
||||||
while(<STDIN>) {
|
while(<STDIN>) {
|
||||||
my $l = $_;
|
my $l = $_;
|
||||||
|
@ -61,44 +72,32 @@ while(<STDIN>) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif($l =~ /^Author: *(.*) +</) {
|
elsif($l =~ /^Author: *(.*) +</) {
|
||||||
$a = $1;
|
|
||||||
}
|
|
||||||
elsif($l =~ /^Commit: *(.*) +</) {
|
|
||||||
$c = $1;
|
$c = $1;
|
||||||
}
|
}
|
||||||
elsif($l =~ /^CommitDate: (.*)/) {
|
elsif($l =~ /^CommitDate: (.*)/) {
|
||||||
$date = nicedate($1);
|
$date = nicedate($1);
|
||||||
}
|
}
|
||||||
elsif($l =~ /^( )(.*)/) {
|
elsif($l =~ /^( )(.*)/) {
|
||||||
my $extra;
|
my $pref = " ";
|
||||||
if ($tag) {
|
if ($tag) {
|
||||||
# Version entries have a special format
|
# Version entries have a special format
|
||||||
print "\nVersion " . $tag." ($date)\n";
|
print "\nVersion " . $tag." ($date)\n";
|
||||||
$oldc = "";
|
$oldc = "";
|
||||||
$tag = "";
|
$tag = "";
|
||||||
}
|
}
|
||||||
if($a ne $c) {
|
|
||||||
$extra=sprintf("\n- [%s brought this change]\n\n ", $a);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$extra="\n- ";
|
|
||||||
}
|
|
||||||
if($co ne $oldco) {
|
if($co ne $oldco) {
|
||||||
if($c ne $oldc) {
|
if($c ne $oldc) {
|
||||||
print "\n$c ($date)$extra";
|
print "\n$c ($date)\n\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print "$extra";
|
print "\n";
|
||||||
}
|
}
|
||||||
$line =0;
|
$pref = "- ";
|
||||||
}
|
}
|
||||||
|
|
||||||
$oldco = $co;
|
$oldco = $co;
|
||||||
$oldc = $c;
|
$oldc = $c;
|
||||||
$olddate = $date;
|
$olddate = $date;
|
||||||
if($line++ && $2 ne "") {
|
printmsg($pref, $2);
|
||||||
print " ";
|
|
||||||
}
|
|
||||||
print $2."\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user