NEW 62965
webkit-patch/svn-create-patch created patch with invalid chunk range lines
https://bugs.webkit.org/show_bug.cgi?id=62965
Summary webkit-patch/svn-create-patch created patch with invalid chunk range lines
Daniel Bates
Reported 2011-06-19 22:37:42 PDT
The attachment 97685 [details] (of bug #62613) failed to apply because it's malformed since it contains invalid chunk range lines. For example, the diff for JSCParser.cpp contains the following chunk: [[ @@ -71,8 +82,9 @@ COMPILE_ASSERT(LastUntaggedToken < 64, L class JSParser { public: - JSParser(Lexer*, JSGlobalData*, FunctionParameters*, bool isStrictContext, bool isFunction, SourceProvider*); - const char* parseProgram(); + JSParser(Lexer*, JSGlobalData*, FunctionParameters*, bool isStrictContext, bool isFunction, const SourceCode*); + UString parseProgram(); private: struct AllowInOverride { AllowInOverride(JSParser* parser) ]] But the chunk range line should be @@ -71,8 +82,8 @@ (since we have 8 lines of text after the change - the same number of lines we started with)
Attachments
Malformed diff for JSCParser.cpp (23.70 KB, patch)
2011-06-19 22:39 PDT, Daniel Bates
no flags
Reproduced diff for JSCParser.cpp (produced by svn diff) (22.80 KB, patch)
2011-06-19 22:41 PDT, Daniel Bates
no flags
Reproduced diff for JSCParser.cpp (produced by svn-create-patch) (23.69 KB, patch)
2011-06-19 22:45 PDT, Daniel Bates
no flags
requested diff. (348.36 KB, text/plain)
2011-06-20 10:22 PDT, Juan C. Montemayor
no flags
Daniel Bates
Comment 1 2011-06-19 22:39:25 PDT
Created attachment 97747 [details] Malformed diff for JSCParser.cpp Extracted from attachment 97685 [details].
Daniel Bates
Comment 2 2011-06-19 22:41:31 PDT
Created attachment 97748 [details] Reproduced diff for JSCParser.cpp (produced by svn diff) Reproduced the JSCParser.cpp changes and then used svn diff to generate this diff.
Oliver Hunt
Comment 3 2011-06-19 22:45:20 PDT
What the heck is svn-create-patch doing to break patches? Why does it need to modify the diff at all? /me cries at the horror that is svn
Daniel Bates
Comment 4 2011-06-19 22:45:21 PDT
Created attachment 97750 [details] Reproduced diff for JSCParser.cpp (produced by svn-create-patch) Reproduced the JSCParser.cpp changes and then used svn-create-patch to generate this diff. Notice that this diff is identical to the diff produced by svn diff (attachment 97748 [details]) up to the inlined context line to the right of the chunk range.
Daniel Bates
Comment 5 2011-06-19 22:50:10 PDT
@Juan: Can you elaborate on how you created attachment 97685 [details]? Oliver Hunt stated that this patch was produced via webkit-patch (bug 62613 comment 32). Assuming you still have this change applied to your working copy, can you run svn diff from the top-level WebKit directory, redirecting its output to a file, and post it as an attachment on this bug?
Juan C. Montemayor
Comment 6 2011-06-20 10:20:45 PDT
(In reply to comment #5) > @Juan: Can you elaborate on how you created attachment 97685 [details]? Oliver Hunt stated that this patch was produced via webkit-patch (bug 62613 comment 32). Attachment 97685 [details] was created using svn-create-patch. I am currently creating a patch with webkit-patch to see if that works. Additionally I will re-run svn-create-patch and diff that with the bad patch to see if anything has changed. > Assuming you still have this change applied to your working copy, can you run svn diff from the top-level WebKit directory, redirecting its output to a file, and post it as an attachment on this bug? Yep. Will attach diff in a minute.
Juan C. Montemayor
Comment 7 2011-06-20 10:22:01 PDT
Created attachment 97820 [details] requested diff.
Note You need to log in before you can comment on or make changes to this bug.