Bug 29622

Summary: svn-apply can exit(0) even on patch failure
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: Tools / TestsAssignee: Eric Seidel (no email) <eric>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, mark
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 30826    
Bug Blocks:    
Attachments:
Description Flags
log from another silent failure
none
Hopefully catch all cases
none
Hopefully catch all cases none

Eric Seidel (no email)
Reported 2009-09-21 16:32:13 PDT
svn-apply can exit(0) even on patch failure This is bad for the commit-queue/bugzilla-tool as it depends on svn-apply exiting non-zero on patch failure. It's possible that bugzilla-tool could land an incomplete patch as-is. Some examples from the code: sub scmCopy($$) { my ($source, $destination) = @_; if ($isSVN) { system "svn", "copy", $source, $destination; } elsif ($isGit) { system "cp", $source, $destination; system "git", "add", $destination; } } sub scmAdd($) { my ($path) = @_; if ($isSVN) { system "svn", "add", $path; } elsif ($isGit) { system "git", "add", $path; } } sub scmRemove($) { my ($path) = @_; if ($isSVN) { # SVN is very verbose when removing directories. Squelch all output except the last line. my $svnOutput; open SVN, "svn rm --force '$path' |" or die "svn rm --force '$path' failed!"; # Only print the last line. Subversion outputs all changed statuses below $dir while (<SVN>) { $svnOutput = $_; } close SVN; print $svnOutput if $svnOutput; } elsif ($isGit) { system "git", "rm", "--force", $path; } }
Attachments
log from another silent failure (1.70 KB, text/plain)
2009-09-24 15:03 PDT, Eric Seidel (no email)
no flags
Hopefully catch all cases (1.76 KB, patch)
2009-10-23 17:15 PDT, Eric Seidel (no email)
no flags
Hopefully catch all cases (2.03 KB, patch)
2009-10-23 17:19 PDT, Eric Seidel (no email)
no flags
Eric Seidel (no email)
Comment 1 2009-09-24 15:03:00 PDT
Created attachment 40081 [details] log from another silent failure
Mark Mentovai
Comment 2 2009-09-24 15:08:33 PDT
git diffs don't have Index: lines?
Eric Seidel (no email)
Comment 3 2009-09-24 15:09:14 PDT
I think the log message from svn-apply is misleading.
Eric Seidel (no email)
Comment 4 2009-09-24 15:11:00 PDT
svn-apply uses this magic function to convert git diffs to svn diffs before processing: http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/svn-apply#L316 Also, I probably should have split out these two bugs. The fact that that patch failed to apply is likely a separate bug from the fact that svn-apply can error out silently (thus causing badness!)
Eric Seidel (no email)
Comment 5 2009-10-23 17:15:48 PDT
Created attachment 41766 [details] Hopefully catch all cases
Eric Seidel (no email)
Comment 6 2009-10-23 17:19:04 PDT
Created attachment 41767 [details] Hopefully catch all cases
Adam Barth
Comment 7 2009-10-27 00:38:03 PDT
Comment on attachment 41767 [details] Hopefully catch all cases die die die!
WebKit Commit Bot
Comment 8 2009-10-27 03:09:28 PDT
Comment on attachment 41767 [details] Hopefully catch all cases Clearing flags on attachment: 41767 Committed r50137: <http://trac.webkit.org/changeset/50137>
WebKit Commit Bot
Comment 9 2009-10-27 03:09:32 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.