[openssl-commits] [tools] master update
Richard Levitte
levitte at openssl.org
Tue Jun 20 14:14:01 UTC 2017
The branch master has been updated
via e516fb0ccc922861b26628f06cf32ec5de8b7308 (commit)
via 722e16cdc4956dba711ad6009884f0ffd6bdf372 (commit)
from a1f9fa9d7592c91f0bb7eee4828d587063843a52 (commit)
- Log -----------------------------------------------------------------
commit e516fb0ccc922861b26628f06cf32ec5de8b7308
Author: Richard Levitte <levitte at openssl.org>
Date: Tue Jun 20 16:13:54 2017 +0200
gitaddrev: treat the prnum line separately
commit 722e16cdc4956dba711ad6009884f0ffd6bdf372
Author: Richard Levitte <levitte at openssl.org>
Date: Tue Jun 20 16:12:25 2017 +0200
addrev, gitaddrev: use strict and warnings and deal with the consequences
-----------------------------------------------------------------------
Summary of changes:
review-tools/addrev | 3 +++
review-tools/gitaddrev | 17 ++++++++++++-----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/review-tools/addrev b/review-tools/addrev
index 8da2b03..b3f5531 100755
--- a/review-tools/addrev
+++ b/review-tools/addrev
@@ -1,5 +1,8 @@
#!/usr/bin/perl
+use strict;
+use warnings;
+
my $args = "";
my $filterargs = "HEAD^..";
my $list_reviewers = 0;
diff --git a/review-tools/gitaddrev b/review-tools/gitaddrev
index e1b5f9a..0596aca 100755
--- a/review-tools/gitaddrev
+++ b/review-tools/gitaddrev
@@ -1,12 +1,15 @@
#!/usr/bin/perl
+use strict;
+use warnings;
+
use File::Basename;
use FindBin;
use OpenSSL::Query::REST;
use Module::Load::Conditional qw(can_load);
-can_load(modules => { OpenSSL::Query::DB => undef });
+can_load(modules => { 'OpenSSL::Query::DB' => undef });
my $rmrev = 0;
my @commits;
@@ -181,19 +184,23 @@ my $last_is_rev = 0;
foreach (@commit_message) {
# Start each line with assuming it's not a reviewed-by line
$last_is_rev = 0;
- if (/^\(Merged from https:\/\/github\.com\/openssl\/openssl\/pull\//
- || /^Reviewed-by:\s*(\S.*\S)\s*$/) {
+ if (/^\(Merged from https:\/\/github\.com\/openssl\/openssl\/pull\//) {
+ next if $rmrev == 1;
+ $last_is_rev = 1;
+ next; # Because we're rewriting it below
+ # (unless --nopr was given in addrev)
+ } elsif (/^Reviewed-by:\s*(\S.*\S)\s*$/) {
my $id = $1;
next if $rmrev == 1;
$last_is_rev = 1;
# Remove reviewers that are already in the message from our reviewer list
- @reviewers = grep { $_ ne $id } @reviewers if $id;
+ @reviewers = grep { $_ ne $id } @reviewers;
}
print $_,"\n";
}
if ($rmrev == 0) {
#Add a blank line unless the last one is a review line
- print "\n" unless $have_rev;
+ print "\n" unless $last_is_rev;
foreach(@reviewers) {
print "Reviewed-by: $_\n";
}
More information about the openssl-commits
mailing list