Degenerate behaviour from bzr diff
Alexander Belchenko
bialix at ukr.net
Tue Sep 25 01:22:25 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Paul Moore пишет:
> On 24/09/2007, Michael Alan Dorman <mdorman at tendentious.org> wrote:
>> On Mon, 24 Sep 2007 20:50:35 +0100
>> "Paul Moore" <p.f.moore at gmail.com> 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?
>> I can't help but notice you are on Windows. Did your editor change the
>> line endings?
>
> Aaaaaargh!!!!
>
> You're absolutely right. Well, sort of. My *editor* (vim) didn't
> change the line endings (I won't use an editor that can't keep line
> endings in the form the file had them in). However, I created the new
> version of my file via "patch", rather than directly in my editor, and
> the version of patch I have on Windows *does* mangle line endings.
Teach yourself run patch with flag --binary when you work on Windows.
> The irony is that I'm a strong believer in programs never mangling
> line endings on Windows - either \r\n or \n should be valid, but they
> are *not* interchangeable. That's why I use programs like bzr in the
> first place. Grumble. I really must find a version of patch that
> preserves line endings properly.
>
> Thanks for noticing this. I wonder - would it be possible for bzr to
> notice this (obviously not uncommon!) mistake, and issue a warning?
I'm planning to work on proper line-endings support after versioned properties
will land in bzr.dev.
- --
[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFG+FTBzYr338mxwCURAqo/AKCA08fD6qCjAH6aSaiMc9XDrHSrygCePFyg
z/eBiiYaG08KBEagVz8xXAc=
=TQk1
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list