Bug 36570

Summary: resolve-ChangeLogs: fall back to git-merge-file if ChangeLog can't be merged
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Tools / TestsAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: cjerdonek, eric, evan, vestbo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch v1 eric: review+

Description David Kilzer (:ddkilzer) 2010-03-24 18:41:03 PDT
Created attachment 51573 [details]
Patch

Reviewed by Eric Seidel.

When resolve-ChangeLogs fails to merge a patch while running as
a git merge driver, it deletes the original file, which causes
an internal failure and stops git mid-merge:

fatal: Failed to execute internal merge

The fix is to use the --force switch with patch so that it will
always attempt to apply the patch.  (The change in
mergeChangeLogs() for the previous commit also fixed this, but
adding --force also prevents any potential user interaction that
patch may want to display.)

* Scripts/VCSUtils.pm:
(mergeChangeLogs): Added --force switch to patch command.  Also
changed to use the exit status from the patch command to
determine the return value for this method.
* Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl: Added
test to cover this bug.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
---
 3 files changed, 99 insertions(+), 5 deletions(-)
Comment 1 David Kilzer (:ddkilzer) 2010-03-24 18:41:36 PDT
Comment on attachment 51573 [details]
Patch

Wrong patch.
Comment 2 David Kilzer (:ddkilzer) 2010-03-24 18:42:11 PDT
Created attachment 51574 [details]
Patch v1
Comment 3 David Kilzer (:ddkilzer) 2010-03-24 18:42:52 PDT
Please ignore the description in Comment #0.
Comment 4 Eric Seidel (no email) 2010-03-24 19:34:24 PDT
Comment on attachment 51574 [details]
Patch v1

LGTM.
Comment 5 Eric Seidel (no email) 2010-03-24 19:42:31 PDT
Attachment 51574 [details] was posted by a committer and has review+, assigning to David Kilzer for commit.
Comment 6 David Kilzer (:ddkilzer) 2010-03-24 21:16:45 PDT
Committed r56483: <http://trac.webkit.org/changeset/56483>