Bug 27483 - diff_parser should accept lines without trailing \n
Summary: diff_parser should accept lines without trailing \n
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-20 23:10 PDT by Shinichiro Hamaji
Modified: 2009-07-21 03:13 PDT (History)
1 user (show)

See Also:


Attachments
Patch v1 (3.28 KB, patch)
2009-07-20 23:14 PDT, Shinichiro Hamaji
levin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shinichiro Hamaji 2009-07-20 23:10:18 PDT
It would be better to normalize the input lines by removing trailing newlines to accept both patch.splitlines() and file object.
Comment 1 Shinichiro Hamaji 2009-07-20 23:14:08 PDT
Created attachment 33145 [details]
Patch v1


---
 3 files changed, 29 insertions(+), 2 deletions(-)
Comment 2 David Levin 2009-07-20 23:50:07 PDT
Comment on attachment 33145 [details]
Patch v1

> diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog

> +
> +        Normalize the input lines by removing a trailing newline.
> +        Also, add a case for unittest for newly added files.
I think this reads better: "Also, add a case to the unittest for newly added files."

fwiw, it is best to keep your patches focused on one thing and this does a bit more, so the bug doesn't reflect what is being done. However, it is all rather simple and you do describe it, so no need to break it up this time.
Comment 3 David Levin 2009-07-21 03:13:15 PDT
Committed as http://trac.webkit.org/changeset/46164