Degenerate behaviour from bzr diff
Robert Collins
robertc at robertcollins.net
Mon Sep 24 20:56:43 BST 2007
On Mon, 2007-09-24 at 20:50 +0100, Paul Moore wrote:
> I just tried using bzr to manage a quick patching session. Nothing
> fancy, grab a small distribution, bzr init, hack a bit, then bzr diff
> to create a patch.
>
> Or so I thought. In spite of the changes being pretty small, bzr diff
> chose to show the complete file being replaced! Clearly completely
> useless as a patch to send back upstream :-(
>
> I was originally using bzr 0.18, but I updated to 0.91 rc 2, and get
> the same behaviour.
>
> Any suggestions?
You are on windows :).
Try dos2unix on setup.py.
Background: Windows inherited from DOS a different line ending character
than unix, and this makes every line look different.
bzr tries to record exactly what you have on disk byte for byte, to
avoid corrupting binary files like jpg or icons, which CVS was famous
for at one point.
We're planning to add logic to allow bzr to Do The Right Thing on
windows without your needing to worry so much, though that will require
some user input to hint at binary vs textness for files. This will
involve both 'diff' being able to compare two lines that have different
line endings but no other differences as being the same, and also commit
and checkout special casing text files in some manner (which is not
finalised yet).
HTH,
-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070925/536ae2d2/attachment.pgp
More information about the bazaar
mailing list