Bug 36570 - resolve-ChangeLogs: fall back to git-merge-file if ChangeLog can't be merged
Summary: resolve-ChangeLogs: fall back to git-merge-file if ChangeLog can't be merged
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
Depends on:
Reported: 2010-03-24 18:41 PDT by David Kilzer (:ddkilzer)
Modified: 2010-03-24 21:16 PDT (History)
4 users (show)

See Also:

Patch (5.14 KB, patch)
2010-03-24 18:41 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch v1 (1.16 KB, patch)
2010-03-24 18:42 PDT, David Kilzer (:ddkilzer)
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2010-03-24 18:41:03 PDT
Created attachment 51573 [details]

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]

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

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>