[PATCH] testbot: Use a more explicit filename to stage patchsets.

Francois Gouget fgouget at codeweavers.com
Wed Jan 22 04:16:11 CST 2020


Use a different filename for patches and patchsets so that in case of 
trouble one can trace the staging file to its source.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---

I was wondering whether 'patch' was for old code that was now using 
'patch.diff'. But no. It was for patchsets!

 testbot/bin/Janitor.pl                      | 2 +-
 testbot/lib/WineTestBot/PendingPatchSets.pm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testbot/bin/Janitor.pl b/testbot/bin/Janitor.pl
index 121a3a6066..115b7d5eec 100755
--- a/testbot/bin/Janitor.pl
+++ b/testbot/bin/Janitor.pl
@@ -276,7 +276,7 @@ if (opendir(my $dh, "$DataDir/staging"))
       # These files always expire after one day
       $TTL = 1 - $Age;
     }
-    elsif ($Entry !~ /^[0-9a-f]{32}_(?:patch|patch\.diff|wine-patches|winetest(?:64)?-latest\.exe)$/)
+    elsif ($Entry !~ /^[0-9a-f]{32}_(?:patch\.diff|patchset\.diff|wine-patches|winetest(?:64)?-latest\.exe)$/)
     {
       my $Deletion = defined $TTL ? " (deletion in $TTL days)" : "";
       Error "Found a suspicious file$Deletion: staging/$Entry\n";
diff --git a/testbot/lib/WineTestBot/PendingPatchSets.pm b/testbot/lib/WineTestBot/PendingPatchSets.pm
index 286b393142..5be39e4016 100644
--- a/testbot/lib/WineTestBot/PendingPatchSets.pm
+++ b/testbot/lib/WineTestBot/PendingPatchSets.pm
@@ -104,7 +104,7 @@ sub SubmitSubset($$$)
 {
   my ($self, $MaxPart, $FinalPatch) = @_;
 
-  my ($CombinedFile, $CombinedFileName) = OpenNewFile("$DataDir/staging", "_patch");
+  my ($CombinedFile, $CombinedFileName) = OpenNewFile("$DataDir/staging", "_patchset.diff");
   return "Could not create a combined patch file: $!" if (!$CombinedFile);
 
   my $ErrMessage;
-- 
2.20.1




More information about the wine-devel mailing list