Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-03

Patch: problems with LineEndings

7 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bart

Hi,

Maybe an RTFM question, but I didn't find an answer.

I receive patches and they are in Unix style end-of-line (Lf) (and this I cannot control).
My local sources are in Windows style (CrLf).

I cannot get patch to apply the patchfile to my sources. I tried the option in patch that ignores whitespace, but it fails.

In the end I converted the patchfile to have Windows end-of-line style, and that worked.

I use patch that comes with fpc 2.6.2RC1.

How to solve this?

Bart

Reply by email

Reinier Olislagers
to Bart
Bart wrote 17 lines
Hi, Maybe an RTFM question, but I didn't find an answer. I receive patches and they are in Unix style end-of-line (Lf) (and this I cannot control). My local sources are in Windows style (CrLf). I cannot get patch to apply the patchfile to my sources. I tried the option in patch that ignores whitespace, but it fails. In the end I converted the patchfile to have Windows end-of-line style, and that worked. I use patch that comes with fpc 2.6.2RC1. How to solve this?

AFAIK, there's no way that that patch.exe can deal with it.

Reply by email

Mattias Gaertner
to Bart: Maybe an RTFM question, but I didn't find an answer. I receive patches and they are in…

Bart hat am 15. M?rz 2013 um 14:28 geschrieben:

Show quoted text 7 lines
Hi, Maybe an RTFM question, but I didn't find an answer. I receive patches and they are in Unix style end-of-line (Lf) (and this I cannot control). My local sources are in Windows style (CrLf).

The Linux "patch" is clever enough to auto convert line endings. Maybe the fpc version converts to Linux line ending instead of Windows line endings?

I cannot get patch to apply the patchfile to my sources. I tried the option in patch that ignores whitespace, but it fails.

whitespaces are tabs and spaces, not line endings.

In the end I converted the patchfile to have Windows end-of-line style, and that worked.

Yes, that's the solution.

I use patch that comes with fpc 2.6.2RC1. How to solve this?

Mattias

Reply by email

Maxim Ganetsky
to Bart: Maybe an RTFM question, but I didn't find an answer. I receive patches and they are in…

15.03.2013 17:28, Bart ?????:

Show quoted text 17 lines
Hi, Maybe an RTFM question, but I didn't find an answer. I receive patches and they are in Unix style end-of-line (Lf) (and this I cannot control). My local sources are in Windows style (CrLf). I cannot get patch to apply the patchfile to my sources. I tried the option in patch that ignores whitespace, but it fails. In the end I converted the patchfile to have Windows end-of-line style, and that worked. I use patch that comes with fpc 2.6.2RC1. How to solve this?

Don't remember these problems with TortoiseSVN patch function.

Best regards, Maxim Ganetsky mailto:

Reply by email