pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: scripts: add Perl script to add links to release notes
9+ messages / 2 participants
[nested] [flat]
Commits from this thread:
2024-09-19 8adb4f233a 6ce8c2c292 681bbd07cc 43a6b90aae 967316eebb 211684380a f057781686 Improve Perl script which adds commit links to release notes
* pgsql: scripts: add Perl script to add links to release notes
@ 2024-09-16 17:27 Bruce Momjian <bruce@momjian.us>
2024-09-17 13:47 ` Re: pgsql: scripts: add Perl script to add links to release notes Andrew Dunstan <andrew@dunslane.net>
0 siblings, 1 reply; 9+ messages in thread
From: Bruce Momjian @ 2024-09-16 17:27 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
scripts: add Perl script to add links to release notes
Reported-by: jian he
Discussion: https://postgr.es/m/ZuYsS5XdA7hVcV9l@momjian.us
Backpatch-through: 12
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/257210455257aaac30001914886d422cbf34c215
Modified Files
--------------
src/tools/RELEASE_CHANGES | 1 +
src/tools/add_commit_links.pl | 136 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 137 insertions(+)
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: pgsql: scripts: add Perl script to add links to release notes
2024-09-16 17:27 pgsql: scripts: add Perl script to add links to release notes Bruce Momjian <bruce@momjian.us>
@ 2024-09-17 13:47 ` Andrew Dunstan <andrew@dunslane.net>
2024-09-19 12:45 ` Re: pgsql: scripts: add Perl script to add links to release notes Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 9+ messages in thread
From: Andrew Dunstan @ 2024-09-17 13:47 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; pgsql-committers@lists.postgresql.org
On 2024-09-16 Mo 1:27 PM, Bruce Momjian wrote:
> scripts: add Perl script to add links to release notes
>
> Reported-by: jian he
>
> Discussion:https://postgr.es/m/ZuYsS5XdA7hVcV9l@momjian.us
I realize I'm late to the party on this, but here's a review patch for
this script. It's mostly stylistic changes (simpler use of print, use of
POSIX xdigit class for hex digits), but it does correct one actual
error: AFAIK "die" doesn't do printf style substitutions.
cheers
andrew
--
Andrew Dunstan
EDB:https://www.enterprisedb.com
Attachments:
add_commit_links.patch (text/x-patch, 1.6K) download
diff --git a/src/tools/add_commit_links.pl b/src/tools/add_commit_links.pl
index ebfc97ea32..64a5783297 100755
--- a/src/tools/add_commit_links.pl
+++ b/src/tools/add_commit_links.pl
@@ -51,9 +51,8 @@ sub process_file
$file =~ m/-(\d+)\./;
my $major_version = $1;
- open(my $fh, '<', $file) || die "could not open file %s: $!\n", $file;
- open(my $tfh, '>', $tmpfile) || die "could not open file %s: $!\n",
- $tmpfile;
+ open(my $fh, '<', $file) || die "could not open file $file: $!\n";
+ open(my $tfh, '>', $tmpfile) || die "could not open file $tmpfile: $!\n";
while (<$fh>)
{
@@ -64,9 +63,9 @@ sub process_file
# skip over commit links because we will add them below
next
if (!$in_comment &&
- m{^\s*<ulink url="&commit_baseurl;[\da-f]+">§</ulink>\s*$});
+ m{^\s*<ulink url="&commit_baseurl;[[:xdigit:]]+">§</ulink>\s*$});
- if ($in_comment && m/\[([\da-f]+)\]/)
+ if ($in_comment && m/\[([[:xdigit:]]+)\]/)
{
my $hash = $1;
@@ -88,23 +87,21 @@ sub process_file
{
for my $hash (@hashes)
{
- print({$tfh}
- "$prev_leading_space<ulink url=\"&commit_baseurl;$hash\">§</ulink>\n"
- );
+ print $tfh
+ "$prev_leading_space<ulink url=\"&commit_baseurl;$hash\">§</ulink>\n";
}
@hashes = ();
}
else
{
- printf(
- "hashes found but no matching text found for placement on line %s\n",
- $lineno);
+ print
+ "hashes found but no matching text found for placement on line $lineno\n";
exit(1);
}
}
}
- print({$tfh} $_);
+ print $tfh $_;
$prev_line_ended_with_paren = m/\)\s*$/;
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: pgsql: scripts: add Perl script to add links to release notes
2024-09-16 17:27 pgsql: scripts: add Perl script to add links to release notes Bruce Momjian <bruce@momjian.us>
2024-09-17 13:47 ` Re: pgsql: scripts: add Perl script to add links to release notes Andrew Dunstan <andrew@dunslane.net>
@ 2024-09-19 12:45 ` Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 9+ messages in thread
From: Bruce Momjian @ 2024-09-19 12:45 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-committers@lists.postgresql.org
On Tue, Sep 17, 2024 at 09:47:57AM -0400, Andrew Dunstan wrote:
>
> On 2024-09-16 Mo 1:27 PM, Bruce Momjian wrote:
>
> scripts: add Perl script to add links to release notes
>
> Reported-by: jian he
>
> Discussion: https://postgr.es/m/ZuYsS5XdA7hVcV9l@momjian.us
>
>
> I realize I'm late to the party on this, but here's a review patch for this
> script. It's mostly stylistic changes (simpler use of print, use of POSIX
> xdigit class for hex digits), but it does correct one actual error: AFAIK "die"
> doesn't do printf style substitutions.
Patch applied. Sorry for the delay.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
When a patient asks the doctor, "Am I going to die?", he means
"Am I going to die soon?"
^ permalink raw reply [nested|flat] 9+ messages in thread
* pgsql: scripts: add Perl script to add links to release notes
@ 2024-09-16 17:27 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 9+ messages in thread
From: Bruce Momjian @ 2024-09-16 17:27 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
scripts: add Perl script to add links to release notes
Reported-by: jian he
Discussion: https://postgr.es/m/ZuYsS5XdA7hVcV9l@momjian.us
Backpatch-through: 12
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/054a23b67402767ec23452a9ff512025a62a80f8
Modified Files
--------------
src/tools/RELEASE_CHANGES | 1 +
src/tools/add_commit_links.pl | 136 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 137 insertions(+)
^ permalink raw reply [nested|flat] 9+ messages in thread
* pgsql: scripts: add Perl script to add links to release notes
@ 2024-09-16 17:27 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 9+ messages in thread
From: Bruce Momjian @ 2024-09-16 17:27 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
scripts: add Perl script to add links to release notes
Reported-by: jian he
Discussion: https://postgr.es/m/ZuYsS5XdA7hVcV9l@momjian.us
Backpatch-through: 12
Branch
------
REL_16_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/dab80b93037c3eb6cef4a1d835d36364980cdf6a
Modified Files
--------------
src/tools/RELEASE_CHANGES | 1 +
src/tools/add_commit_links.pl | 136 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 137 insertions(+)
^ permalink raw reply [nested|flat] 9+ messages in thread
* pgsql: scripts: add Perl script to add links to release notes
@ 2024-09-16 17:27 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 9+ messages in thread
From: Bruce Momjian @ 2024-09-16 17:27 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
scripts: add Perl script to add links to release notes
Reported-by: jian he
Discussion: https://postgr.es/m/ZuYsS5XdA7hVcV9l@momjian.us
Backpatch-through: 12
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/ccd1ddc50750129a7900948ac28eef907bdbed51
Modified Files
--------------
src/tools/RELEASE_CHANGES | 1 +
src/tools/add_commit_links.pl | 136 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 137 insertions(+)
^ permalink raw reply [nested|flat] 9+ messages in thread
* pgsql: scripts: add Perl script to add links to release notes
@ 2024-09-16 17:27 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 9+ messages in thread
From: Bruce Momjian @ 2024-09-16 17:27 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
scripts: add Perl script to add links to release notes
Reported-by: jian he
Discussion: https://postgr.es/m/ZuYsS5XdA7hVcV9l@momjian.us
Backpatch-through: 12
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/a499f79fd01c74ec949c927fa656d689733a7c0e
Modified Files
--------------
src/tools/RELEASE_CHANGES | 1 +
src/tools/add_commit_links.pl | 136 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 137 insertions(+)
^ permalink raw reply [nested|flat] 9+ messages in thread
* pgsql: scripts: add Perl script to add links to release notes
@ 2024-09-16 17:27 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 9+ messages in thread
From: Bruce Momjian @ 2024-09-16 17:27 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
scripts: add Perl script to add links to release notes
Reported-by: jian he
Discussion: https://postgr.es/m/ZuYsS5XdA7hVcV9l@momjian.us
Backpatch-through: 12
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/9052475cd9f0e0a954167d940bc776186aff9ef9
Modified Files
--------------
src/tools/RELEASE_CHANGES | 1 +
src/tools/add_commit_links.pl | 136 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 137 insertions(+)
^ permalink raw reply [nested|flat] 9+ messages in thread
* pgsql: scripts: add Perl script to add links to release notes
@ 2024-09-16 17:27 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 9+ messages in thread
From: Bruce Momjian @ 2024-09-16 17:27 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
scripts: add Perl script to add links to release notes
Reported-by: jian he
Discussion: https://postgr.es/m/ZuYsS5XdA7hVcV9l@momjian.us
Backpatch-through: 12
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/63357b6c7f631131488b8af83d10d9dedfdccaab
Modified Files
--------------
src/tools/RELEASE_CHANGES | 1 +
src/tools/add_commit_links.pl | 136 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 137 insertions(+)
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2024-09-19 12:45 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-09-16 17:27 pgsql: scripts: add Perl script to add links to release notes Bruce Momjian <bruce@momjian.us>
2024-09-17 13:47 ` Re: pgsql: scripts: add Perl script to add links to release notes Andrew Dunstan <andrew@dunslane.net>
2024-09-19 12:45 ` Re: pgsql: scripts: add Perl script to add links to release notes Bruce Momjian <bruce@momjian.us>
2024-09-16 17:27 pgsql: scripts: add Perl script to add links to release notes Bruce Momjian <bruce@momjian.us>
2024-09-16 17:27 pgsql: scripts: add Perl script to add links to release notes Bruce Momjian <bruce@momjian.us>
2024-09-16 17:27 pgsql: scripts: add Perl script to add links to release notes Bruce Momjian <bruce@momjian.us>
2024-09-16 17:27 pgsql: scripts: add Perl script to add links to release notes Bruce Momjian <bruce@momjian.us>
2024-09-16 17:27 pgsql: scripts: add Perl script to add links to release notes Bruce Momjian <bruce@momjian.us>
2024-09-16 17:27 pgsql: scripts: add Perl script to add links to release notes Bruce Momjian <bruce@momjian.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox