Alexandre Julliard : patches: Add support for assigned status and reviewer field.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Oct 15 07:28:54 CDT 2015


Module: tools
Branch: master
Commit: 444dec78182788388366f864c602817b6e746cbc
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=444dec78182788388366f864c602817b6e746cbc

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Oct 15 17:47:45 2015 +0900

patches: Add support for assigned status and reviewer field.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 patches/expire      | 12 +++++++++++-
 patches/patches.css |  1 +
 patches/update      | 24 +++++++++++++++++++++---
 3 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/patches/expire b/patches/expire
index 0f26d8a..0ff3bc7 100755
--- a/patches/expire
+++ b/patches/expire
@@ -25,6 +25,7 @@ my %status_expiry =
 (
  "nil"        => 30,
  "pending"    => 30,
+ "assigned"   => 30,
  "applied"    => 30,
  "committed"  => 1,
  "applyfail"  => 7,
@@ -47,6 +48,7 @@ my %status_descr =
 (
  "nil"        => "New",
  "pending"    => "Pending",
+ "assigned"   => "Assigned",
  "applied"    => "Applied",
  "committed"  => "Committed",
  "applyfail"  => "Apply failure",
@@ -73,6 +75,11 @@ correctness is not obvious. You should either write a test case
 demonstrating that it is correct, try to fix the problem in a more
 straightforward way, or better explain why you are doing things this
 way.",
+ "assigned"    =>
+"This means that the patch has been assigned to a reviewer. If the
+reviewer signs off on the patch, it will be committed, otherwise
+you'll receive advice on how to improve it. If you don't hear anything
+after a couple of weeks, please resend the patch.",
  "committed"  =>
 "This means that your patch has been approved, and committed to the
 main git tree. Congratulations!",
@@ -271,7 +278,7 @@ been reviewed and its status set to "$status_descr{$status}".
 $status_explanation{$status}
 EOF
 
-    if ($status ne "committed")
+    if ($status ne "committed" && $status ne "assigned")
     {
         print SENDMAIL <<"EOF";
 
@@ -306,6 +313,7 @@ foreach my $file (sort readdir DIR)
                 rename "$dir/$file",        "$dir/OLD/$file";
                 rename "$dir/$file.status", "$dir/OLD/$file.status";
                 rename "$dir/$file.order",  "$dir/OLD/$file.order";
+                rename "$dir/$file.review", "$dir/OLD/$file.review";
                 rename "$dir/$file.signoff", "$dir/OLD/$file.signoff";
                 rename "$dir/$file.testbot", "$dir/OLD/$file.testbot";
                 rename "$dir/$file.testfail", "$dir/OLD/$file.testfail";
@@ -320,6 +328,7 @@ foreach my $file (sort readdir DIR)
                 unlink "$dir/$file.status";
                 unlink "$dir/$file.order";
                 unlink "$dir/$file.signoff";
+                unlink "$dir/$file.review";
                 unlink "$dir/$file.testbot";
                 unlink "$dir/$file.testfail";
                 unlink "$dir/OLD/$file.status";
@@ -351,6 +360,7 @@ foreach my $file (sort readdir DIR)
             unlink "$dir/OLD/$file";
             unlink "$dir/OLD/$file.status";
             unlink "$dir/OLD/$file.order";
+            unlink "$dir/OLD/$file.review";
             unlink "$dir/OLD/$file.signoff";
             unlink "$dir/OLD/$file.testbot";
             unlink "$dir/OLD/$file.testfail";
diff --git a/patches/patches.css b/patches/patches.css
index 5706681..99cc055 100644
--- a/patches/patches.css
+++ b/patches/patches.css
@@ -149,6 +149,7 @@ tr.odd { background-color: #f8e8e8; }
 
 .nil,        .nil :link,        .nil :visited        { color: blue; font-weight: bold; }
 .pending,    .pending :link,    .pending :visited    { color: blue; }
+.assigned,   .assigned :link,   .assigned :visited   { color: blue; }
 .committed,  .committed :link,  .committed :visited  { color: green; }
 .depend,     .depend :link,     .depend :visited     { color: #e08000; }
 .superseded, .superseded :link, .superseded :visited { color: #e08000; }
diff --git a/patches/update b/patches/update
index fa8fd54..97ff543 100755
--- a/patches/update
+++ b/patches/update
@@ -25,6 +25,7 @@ my %status_descr =
 (
  "nil"        => "New",
  "pending"    => "Pending",
+ "assigned"   => "Assigned",
  "applied"    => "Applied",
  "committed"  => "Committed",
  "applyfail"  => "Apply failure",
@@ -46,8 +47,8 @@ my %status_descr =
 my @legend =
 (
  [ "nil",        "<ul><li>Patch not even looked at yet, there's still hope...</li></ul>" ],
- [ "pending",    "<ul><li>The patch is not obviously correct at first glance. Making a more convincing argument, preferably in the form of a test case, may help.</li>" .
-                 "<li>Waiting for feedback from the main developer in that area.</li></ul>" ],
+ [ "pending",    "<ul><li>The patch is not obviously correct at first glance. Making a more convincing argument, preferably in the form of a test case, may help.</li></ul>" ],
+ [ "assigned",   "<ul><li>Waiting for sign-off or feedback from the assigned reviewer. If you don't hear anything after a couple of weeks, please resend the patch.</li></ul>" ],
  [ "committed",  "<ul><li>You have done everything right; congratulations!</li>" .
                  "<li>You screwed up but AJ missed it, send a fix before someone notices ;-)</li></ul>" ],
  [ "depend",     "<ul><li>The patch is part of a series in which a previous patch hasn't been applied. Resend when the dependent patch is fixed.</li></ul>" ],
@@ -91,7 +92,7 @@ my %patches;
 sub format_author($)
 {
     my $str = shift;
-    if ($str =~ /\s*((\"(.*)\")|(.*))\s*<(\S+\@\S+)>/) { return $3 || $4 || $5; }
+    if ($str =~ /\s*((\"(.*)\")|(.*?))\s*<(\S+\@\S+)>/) { return $3 || $4 || $5; }
     return $str;
 }
 
@@ -115,6 +116,7 @@ print INDEX "<table class=\"main\"><tr><th class=\"id\">ID</th>",
     "<th class=\"status\">Status</th>",
     "<th class=\"author\">Author</th>",
     "<th class=\"subject\">Subject</th>",
+    "<th class=\"author\">Reviewer</th>",
     "<th class=\"status\">Sign</th>",
     "<th class=\"status\">Testbot</th>",
     "<th class=\"status\">Job ID</th></tr>\n";
@@ -154,6 +156,14 @@ foreach my $file (readdir DIR)
         $patch{"order"} = <ORDER>;
         close ORDER;
     }
+    if (open REVIEW, "<:raw", "$dir/$file.review")
+    {
+        $_ = <REVIEW>;
+        chomp;
+        utf8::decode($_);
+        $patch{"review"} = format_author($_);
+        close REVIEW;
+    }
     if (open SIGNOFF, "<:raw", "$dir/$file.signoff")
     {
         while (<SIGNOFF>)
@@ -199,6 +209,14 @@ foreach my $file (sort { $patches{$b}->{"order"} <=> $patches{$a}->{"order"} } k
            escapeHTML($patch->{"author"});
     printf INDEX "<td class=\"subject\"><a href=\"data/$file\">%s</a></td>",
            escapeHTML($patch->{"subject"});
+    if ($patch->{"review"})
+    {
+        printf INDEX "<td class=\"author\">%s</td>", escapeHTML($patch->{"review"});
+    }
+    else
+    {
+        printf INDEX "<td></td>";
+    }
     if (defined($patch->{"signoff"}))
     {
         printf INDEX "<td class=\"checkmark\"><a title=\"%s\">✓</a></td>", join("\n",@{$patch->{"signoff"}});




More information about the wine-cvs mailing list