eol=native marks all files as modified

Asked by David Graf

I am working for a cross-platform project to has was recently move from subversion to bazaar. Unfortunately, we weren't able to find a satisfiable solution for the eol difference between windows (crlf) and unix (lf). On subversion, there was the famous eol-property. It was cumbersome to use but it worked.
On bazaar, the help (bzr help eol) suggests to add a filter rule (e.g. [name *] eol = native) to bypass this missmatch. Unfortunately, this has a little problem. If the branch contains the unix line ending (lf), all line endings an a windows working tree are transferred to crlf. That's perfect. But after this transformation, all files are marked as modified because they contain changes.

Is this a real problem or are we doing something wrong?

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
David Graf
Solved:
Last query:
Last reply:
Revision history for this message
John A Meinel (jameinel) said :
#1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Graf wrote:
> New question #94008 on Bazaar:
> https://answers.edge.launchpad.net/bzr/+question/94008
>
> I am working for a cross-platform project to has was recently move from subversion to bazaar. Unfortunately, we weren't able to find a satisfiable solution for the eol difference between windows (crlf) and unix (lf). On subversion, there was the famous eol-property. It was cumbersome to use but it worked.
> On bazaar, the help (bzr help eol) suggests to add a filter rule (e.g. [name *] eol = native) to bypass this missmatch. Unfortunately, this has a little problem. If the branch contains the unix line ending (lf), all line endings an a windows working tree are transferred to crlf. That's perfect. But after this transformation, all files are marked as modified because they contain changes.
>
> Is this a real problem or are we doing something wrong?
>

What does 'bzr diff' actually give you as the changes to the files? It
is possible that this is more of a display issue.

It is also possible that you have subtle issues with line endings (like
some of them are actually stored as crlf in the repository).

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksmU8oACgkQJdeBCYSNAAPmKQCeICus0vV3wMoriEbeMRwiJMsx
AIIAn0YcOtofwMloxT7x6vX6giSsA/m/
=+5Sc
-----END PGP SIGNATURE-----

Revision history for this message
David Graf (davidagraf) said :
#2

Hello John

When I do 'bzr diff', I see each line of the project. Eeach line in which lf was transferred to crlf.

>
> It is also possible that you have subtle issues with line endings (like
> some of them are actually stored as crlf in the repository).
>

Yes, that is the case. Some Windows line endings are in the project because people sometimes committed wrongly.

David

Revision history for this message
John A Meinel (jameinel) said :
#3

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Graf wrote:
> Question #94008 on Bazaar changed:
> https://answers.edge.launchpad.net/bzr/+question/94008
>
> Status: Answered => Open
>
> David Graf is still having a problem:
> Hello John
>
> When I do 'bzr diff', I see each line of the project. Eeach line in
> which lf was transferred to crlf.
>
>> It is also possible that you have subtle issues with line endings (like
>> some of them are actually stored as crlf in the repository).
>>
>
> Yes, that is the case. Some Windows line endings are in the project
> because people sometimes committed wrongly.
>
> David
>

Then it *will* be changing crlf back to lf in the repository, and the
diff is accurate.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksmYA8ACgkQJdeBCYSNAANEvACfbLYbkD9mXJRW6sdTv3nkEF2i
bVIAnii30m45DklhhcM6wTm64kSnyTjl
=8MZe
-----END PGP SIGNATURE-----

Revision history for this message
David Graf (davidagraf) said :
#4

Hello John

That is exactly the case. Thanks a lot for you help.

David