[Lazarus] EOL character used in .lfm files keep changing

Graeme Geldenhuys graemeg at opensoft.homeip.net
Thu Jun 11 14:47:10 CEST 2009


Mattias Gaertner wrote:
> 
> I just tested: They are not huge when using svn diff, nor when using

In the patches I submitted, every single line in the .lfm files have
changed, when in fact only a few values have changed. This makes in near
impossible for the person committing that patch to actually see what I
have changed, before they commit it to the subversion repository.


> Probably you used your diff tool wrong.

% <edit some file>
% git diff                 <== outputs a standard patch format.


or

% <edit some file>
% git add <whetever_file_changed>
% git format-patch HEAD     <== generates text files containing patch>


I now found that I can do the following, which ignores the EOL character
changes.

% git diff --ignore-space-at-eol



> I don't see this given for lfm.

I actually got this mixed up. The original file is in a UNIX format
using LF as the EOL character. I also used the editor called 'syn' to
convert it to DOS (CRLF) and then back to UNIX (LF). 'git diff' showed
no files changed - as expected.

I then opened the .lfm file with Lazarus Form Designer. Changed a value
of a button, clicked save. Then changed the value back to what it was
and clicked save again. For all intent purposes there should be NO
changes. Doing a 'git diff' shows that every line in the .lfm file and
.lrs file has changed.

Opening the .lfm file with 'syn' which then shows me the EOL format
used, shows DOS (CRLF) and the line-ending type. BUT I am using a Linux
version of Lazarus?????

I'm totally confused and this makes no sense at the moment.  The files I
played around with is

  components/filebrowser/frmconfigfilebrowser.lfm
  components/filebrowser/frmconfigfilebrowser.lrs
  components/filebrowser/frmconfigfilebrowser.pas


What is their eol-style property set at for SubVersion? I would guess
it's not set. But that still doesn't explain why my Linux version of
Lazarus changes the .lfm and .lrs to use CRLF when everybody else things
it uses the native EOL character of your platform - which in my case was
LF (before the edit) and is now CRLF after the edit.

See attached screenshots.


BTW:
I did the same test with the .pas file. 'syn' confirmed that it was a
UNIX file. I made changes and saved. I then un-did those changes and
saved again. 'git diff' reported nothing has changed - which is correct.
So the Lazarus editor doesn't fiddle with the EOL characters, but the
Form Designer does.

This is what I want (strangely enough), but then all the .lfm and .lrs
files in the repository should be converted to DOS (CRLF) line-ending
characters to start with and eol-style=crlf should be set.

Regards,
  - Graeme -

_______________________________________________________
fpGUI - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: before_edit.png
Type: image/png
Size: 1164 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20090611/25614014/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: after_edit.png
Type: image/png
Size: 994 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20090611/25614014/attachment-0013.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: after_edit_git_status.png
Type: image/png
Size: 5659 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20090611/25614014/attachment-0014.png>


More information about the Lazarus mailing list