comparison mupdf-source/thirdparty/curl/scripts/log2changes.pl @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 #!/usr/bin/env perl
2
3 # git log --pretty=fuller --no-color --date=short --decorate=full
4
5 my @mname = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
6 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' );
7
8 sub nicedate {
9 my ($date)=$_;
10
11 if($date =~ /(\d\d\d\d)-(\d\d)-(\d\d)/) {
12 return sprintf("%d %s %4d", $3, $mname[$2-1], $1);
13 }
14 return $date;
15 }
16
17 print
18 ' _ _ ____ _
19 ___| | | | _ \| |
20 / __| | | | |_) | |
21 | (__| |_| | _ <| |___
22 \___|\___/|_| \_\_____|
23
24 Changelog
25 ';
26
27 my $line;
28 my $tag;
29 while(<STDIN>) {
30 my $l = $_;
31
32 if($l =~/^commit ([[:xdigit:]]*) ?(.*)/) {
33 $co = $1;
34 my $ref = $2;
35 if ($ref =~ /refs\/tags\/curl-([0-9_]*)/) {
36 $tag = $1;
37 $tag =~ tr/_/./;
38 }
39 }
40 elsif($l =~ /^Author: *(.*) +</) {
41 $a = $1;
42 }
43 elsif($l =~ /^Commit: *(.*) +</) {
44 $c = $1;
45 }
46 elsif($l =~ /^CommitDate: (.*)/) {
47 $date = nicedate($1);
48 }
49 elsif($l =~ /^( )(.*)/) {
50 my $extra;
51 if ($tag) {
52 # Version entries have a special format
53 print "\nVersion " . $tag." ($date)\n";
54 $oldc = "";
55 $tag = "";
56 }
57 if($a ne $c) {
58 $extra=sprintf("\n- [%s brought this change]\n\n ", $a);
59 }
60 else {
61 $extra="\n- ";
62 }
63 if($co ne $oldco) {
64 if($c ne $oldc) {
65 print "\n$c ($date)$extra";
66 }
67 else {
68 print "$extra";
69 }
70 $line =0;
71 }
72
73 $oldco = $co;
74 $oldc = $c;
75 $olddate = $date;
76 if($line++) {
77 print " ";
78 }
79 print $2."\n";
80 }
81 }