`bzr diff` shows diff of a binary file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Triaged
|
Low
|
Unassigned |
Bug Description
I have a publicly available pdf ( http://
which is being shown by `bzr diff` and `commit --show-diff` .
In the latter case my editor (kwrite) warns that I'm trying to open a binary file and opens the commit-message file in read-only mode.
I'm not sure how we detect binary files, but it doesn't seem to work for this file.
Maybe the first part of the file sheds some light.
$ bzr dif | head -n 60
=== added file 'x.pdf'
--- x.pdf 1970-01-01 00:00:00 +0000
+++ x.pdf 2009-01-24 09:53:32 +0000
@@ -0,0 +1,1664 @@
%����-1.6
<</Subtype/
+<?xpacket begin="" id="W5M0MpCehiH
+<x:xmpmeta xmlns:x=
+ <rdf:RDF xmlns:rdf="http://
+ <rdf:Description rdf:about=""
+ xmlns:xap="http://
+ <xap:ModifyDate
+ <xap:CreateDate
+ <xap:MetadataDa
+ </rdf:Description>
+ <rdf:Description rdf:about=""
+ xmlns:dc="http://
+ <dc:format>
+ <dc:title>
+ <rdf:Alt>
+ <rdf:li xml:lang=
+ </rdf:Alt>
+ </dc:title>
+ </rdf:Description>
+ <rdf:Description rdf:about=""
+ xmlns:pdf="http://
+ <pdf:Producer>
+ </rdf:Description>
+ <rdf:Description rdf:about=""
+ xmlns:xapMM="http://
+ <xapMM:
+ <xapMM:
+ </rdf:Description>
+ </rdf:RDF>
+</x:xmpmeta>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<</CropBox[28.6411 29.5148 624.028 872.257]/Parent 63 0 R/Contents[82 0 R 83 0 R 84 0 R 85 0 R 90 0 R 91 0 R 94 0 R 95 0 R]/Rotate 0/BleedBox[28.6411 29.51<<
+h��Z�r����)���_U� ���ڑ▒�R��rH� ��(o�C!/d��gIw�
I just saw this behaviour with a version 1.3 pdf file. I suspect it's any pdf file.
bzr 1.3.1
python 2.5.2
Ubuntu hardy