[BUG] bundle cannot handle binary files

John Arbash Meinel john at arbash-meinel.com
Sat Jul 8 15:35:13 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> John Arbash Meinel пишет:

...

>>
>> I also tried these exact steps on a win32 machine, and got the same
>> results. So something is wrong with your patch, but it doesn't seem to
>> be a problem with the current bzr.dev.
> 
> If my patch is problem then I have to say that patch utility itself on
> pure windows should be invoked with '--binary' flag otherwise it mangle
> line-endings. Without this flag even shelf plugin does not work properly
> with text files.
> 
> May be patch on win32 does not support binary files? Or diff does not
> support binary files?

Sorry, this was a bad statement on my part. I meant your binary.patch
has something wrong with it. Not diff/patch. We don't depend on them in
any core code. Using python's builtin difflib, and custom patch code
(which only does exact patching).


>> I'm not sure what else to tell you. I even checked that the icon looked
>> reasonable (and opened in an image viewer). So everything seems to be
>> okay.
> 
> How I can debug this? Can you send to me your bundle with bzr.ico that
> you create on Linux machine, I'd like to try to compare.
> 
> I try to shelve this binary file with shelf plugin and have similar
> error (MalformedPatchHeader):

...

> When I look at this error I see that shelf plugin does not like my
> binary file because it gets this diff:
> 
> D:\user\MyCode\bzr\__test\a>bzr di
> === added file 'bzr.ico'
> Binary files bzr.ico    1970-01-01 00:00:00 +0000 and bzr.ico
> 2006-05-08 08:18:40 +0000 differ
> 
> This output becomes default after Aaron create auto-detect of binary
> files. In 0.7 there is real diff between binary files similar to text
> files. Can be this fact the root of problem?
> 

Not really. This is only a safegard so that we don't shove garbage out
to the terminal. Though you did just uncover another bug. We should only
be printing the actual filenames, not the filename + timestamp).

Attached is my bundle. I'm wondering if the bzr.ico you emailed has been
corrupted. So here is the md5sum and sha1sum:

$ sha1sum bzr.ico
052ea01f95b82fa224100f4c6bbbafe33a707a6b  bzr.ico
$ md5sum bzr.ico
d39b3755cbe886093198da133d94fe88  bzr.ico

Its possible that the .ico you emailed had already been corrupted
enough, that it works fine everywhere else.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEr8KgJdeBCYSNAAMRAodbAJ40qtSJB0YzAwNZDW+c8N336YB9PwCgtJUP
Sc01msOL7AAJ5rV2c1JaCAI=
=OQne
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bzr-ico.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20060708/ae9ec1f0/attachment.diff 


More information about the bazaar mailing list