Bug 31457 - svn-apply may not handle git patches created by bugzilla-tool
Summary: svn-apply may not handle git patches created by bugzilla-tool
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 31458
  Show dependency treegraph
 
Reported: 2009-11-12 23:21 PST by Shinichiro Hamaji
Modified: 2009-11-15 22:07 PST (History)
0 users

See Also:


Attachments
Patch v1 (2.15 KB, patch)
2009-11-12 23:23 PST, Shinichiro Hamaji
no flags Details | Formatted Diff | Diff
Patch v2 (3.61 KB, patch)
2009-11-13 16:16 PST, Shinichiro Hamaji
no flags 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-11-12 23:21:47 PST
bugzilla-tool's run_command calls rstrip() for stdout, so generated patches will be rstripped. As current svn-apply expects trailing "\n\n" in binary patch, the patching may fail if binary diff is its last diff. It seems removing rstrip() causes unitttest failure in other tests. I think rstripping may happen due to other reasons and the current check is too strict. Let's relax the check a bit.
Comment 1 Shinichiro Hamaji 2009-11-12 23:23:14 PST
Created attachment 43138 [details]
Patch v1
Comment 2 Eric Seidel (no email) 2009-11-13 13:17:33 PST
Comment on attachment 43138 [details]
Patch v1

The rstripping was added for convenience when dealing with output from commands like svn info, where it's just a single line of output and you don't actually want the trailing \n.  We can easily remove the rstrip() and fix all callers to deal with the added newline if that's better?
Comment 3 Shinichiro Hamaji 2009-11-13 16:16:37 PST
Created attachment 43213 [details]
Patch v2
Comment 4 Shinichiro Hamaji 2009-11-13 16:22:40 PST
I agree run_command should return non-rstripped values if there are no critical reasons. I updated my patch.
Comment 5 Eric Seidel (no email) 2009-11-15 21:57:31 PST
Comment on attachment 43213 [details]
Patch v2

Fantastic!
Comment 6 Shinichiro Hamaji 2009-11-15 22:07:01 PST
Thanks for the review! Closing this bug.