shelf plugin, bzrlib/patches.py and binary files diff
John Arbash Meinel
john at arbash-meinel.com
Wed Aug 16 16:42:43 BST 2006
Alexander Belchenko wrote:
> I use Shelf plugin and very often it fails when there is changes in
> binary files. I'm not sure who should draw attention for this error. Per
> example little test with bzr.ico:
>
>
This looks like it won't actually shelve and unshelve the changes to the
binary file. It just allows shelve not to puke on Binary file changes.
Which I guess is a reasonable start.
What you probably want to do is something more like:
bzrlib.bundle.serializer.binary_diff()
Which can generate a base-64 encoded diff of binary contents.
Or just pass allow_binary=True to internal_diff() when you use it.
The contents will be binary chunks, but it means you don't need to know
if a given chunk is base-64 encoded or not.
John
=:->
>
>
> ------------------------------------------------------------------------
>
> === modified file 'bzrlib/patches.py'
> --- bzrlib/patches.py 2006-06-15 03:10:51 +0000
> +++ bzrlib/patches.py 2006-08-15 07:30:49 +0000
> @@ -321,6 +321,8 @@
> continue
> if line.startswith('#'):
> continue
> + if line.startswith('Binary files'):
> + continue
> elif line.startswith('--- '):
> if len(saved_lines) > 0:
> yield saved_lines
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060816/d9a467b8/attachment.pgp
More information about the bazaar
mailing list