Bug 62965 - webkit-patch/svn-create-patch created patch with invalid chunk range lines
Summary: webkit-patch/svn-create-patch created patch with invalid chunk range lines
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-19 22:37 PDT by Daniel Bates
Modified: 2011-06-20 10:22 PDT (History)
3 users (show)

See Also:


Attachments
Malformed diff for JSCParser.cpp (23.70 KB, patch)
2011-06-19 22:39 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Reproduced diff for JSCParser.cpp (produced by svn diff) (22.80 KB, patch)
2011-06-19 22:41 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Reproduced diff for JSCParser.cpp (produced by svn-create-patch) (23.69 KB, patch)
2011-06-19 22:45 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
requested diff. (348.36 KB, text/plain)
2011-06-20 10:22 PDT, Juan C. Montemayor
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 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)
Comment 1 Daniel Bates 2011-06-19 22:39:25 PDT
Created attachment 97747 [details]
Malformed diff for JSCParser.cpp

Extracted from attachment 97685 [details].
Comment 2 Daniel Bates 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.
Comment 3 Oliver Hunt 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
Comment 4 Daniel Bates 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.
Comment 5 Daniel Bates 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?
Comment 6 Juan C. Montemayor 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.
Comment 7 Juan C. Montemayor 2011-06-20 10:22:01 PDT
Created attachment 97820 [details]
requested diff.