[webkit-reviews] review requested: [Bug 9299] Teach
svn-create-patch and friends to work with binary files :
[Attachment 8686] Patch v1
bugzilla-request-daemon at opendarwin.org
bugzilla-request-daemon at opendarwin.org
Sat Jun 3 22:05:16 PDT 2006
David Kilzer (ddkilzer) <ddkilzer at kilzer.net> has asked for review:
Bug 9299: Teach svn-create-patch and friends to work with binary files
http://bugzilla.opendarwin.org/show_bug.cgi?id=9299
Attachment 8686: Patch v1
http://bugzilla.opendarwin.org/attachment.cgi?id=8686&action=edit
------- Additional Comments from David Kilzer (ddkilzer) <ddkilzer at kilzer.net>
Patch v1 is my first pass at implementing this feature. There is no changelog
yet since I figure I'll have to make some adjustments as the first pass isn't
perfect. Here's a run-down of the changes:
svn-create-patch
- Added 2006 to copyright year.
- When creating a patch, look for "Cannot display: file marked as a binary
type." to denote a binary file.
- The contents of the binary file are appended at the end of each binary file
segment as a base64-encoded chunk of text.
svn-apply
- Again uses "Cannot display: file marked as a binary type." to denote a binary
file.
- Handle binary files separately using handleBinaryChange() subroutine.
- Renamed local $file variable to $contents (which made more sense to me).
- handleBinaryChange() uses a regex to pull the base64-encoded text out of the
patch contents.
svn-unapply
- Again uses "Cannot display: file marked as a binary type." to denote a binary
file.
- Simplified unapply logic to removing an existing file if it's there, then
call "svn revert" regardless. (This may be a bit too simplistic for the other
goals outlined in the comments, though.)
Tested with a patch for r14715 as well as a local test where one image file
each was added, deleted and modified. Please test locally, though.
More information about the webkit-reviews
mailing list