summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/svn-unapply
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/Scripts/svn-unapply')
-rwxr-xr-xWebKitTools/Scripts/svn-unapply6
1 files changed, 4 insertions, 2 deletions
diff --git a/WebKitTools/Scripts/svn-unapply b/WebKitTools/Scripts/svn-unapply
index e502560..53ab1b5 100755
--- a/WebKitTools/Scripts/svn-unapply
+++ b/WebKitTools/Scripts/svn-unapply
@@ -139,7 +139,9 @@ sub patch($)
{
my ($diffHashRef) = @_;
- my $patch = $diffHashRef->{svnConvertedText};
+ # Make sure $patch is initialized to some value. There is no
+ # svnConvertedText when reversing an svn copy/move.
+ my $patch = $diffHashRef->{svnConvertedText} || "";
my $fullPath = $diffHashRef->{indexPath};
my $isSvnBinary = $diffHashRef->{isBinary} && $diffHashRef->{isSvn};
@@ -201,7 +203,7 @@ sub patch($)
# FIXME: This should use the same logic as svn-apply's deletion
# code. In particular, svn-apply's scmRemove() subroutine
# should be used here.
- unapplyPatch($patch, $fullPath, ["--force"]);
+ unapplyPatch($patch, $fullPath, ["--force"]) if $patch;
unlink($fullPath) if -z $fullPath;
system "svn", "revert", $fullPath;
}