[tools] testbot/PatchUtils: Fix handling of renames.

Francois Gouget fgouget at codeweavers.com
Thu Mar 11 07:01:43 CST 2021


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50719
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
Note that this does not fix the 'git apply' issue (bug 50720 iirc). That 
will be a different and more complex patch.
---
 testbot/lib/WineTestBot/PatchUtils.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testbot/lib/WineTestBot/PatchUtils.pm b/testbot/lib/WineTestBot/PatchUtils.pm
index 37b1b77ef..796457a21 100644
--- a/testbot/lib/WineTestBot/PatchUtils.pm
+++ b/testbot/lib/WineTestBot/PatchUtils.pm
@@ -389,7 +389,9 @@ sub GetPatchImpacts($)
     }
     elsif ($Line =~ m~^\+\+\+ \w+/([^\s]+)$~)
     {
-      _HandleFile($Impacts, $1, $Change || "modify");
+      my $PlusPath = $1;
+      _HandleFile($Impacts, $Path, "rm") if (defined $Path and $Path ne $PlusPath);
+      _HandleFile($Impacts, $PlusPath, $Change || "modify");
       $Path = undef;
       $Change = "";
     }
-- 
2.20.1



More information about the wine-devel mailing list