<br><br><div class="gmail_quote">On Thu, Jul 12, 2012 at 7:22 PM, Frits Jalvingh <span dir="ltr"><<a href="mailto:jal@etc.to" target="_blank">jal@etc.to</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<div><br></div><div>Files that bzr thinks are binary (like those png and others) should not be added to this file- they have no line endings, and bazaar will not confuse them as text.</div><div><br></div><div>You specify that all files Bazaar thinks of as text files should have native line endings - which is right.</div>

<div><br></div><div>I think what is causing your problem now is that you added that rules file *after* you have already created a repository. Say for instance you created a repo starting from Windows, without that rules file. Now all files in the *repository* have crlf line endings.</div>

<div><br></div><div>Then you added the rules file on your Linux machine, and you branch a new copy. This copy will now have "lf" line endings, because you want native ones.</div><div><br></div><div>Bazaar will, when you have that rules file active, change the "platform" line endings into what it calls the canonical format, and this is what is really stored in the repository. That canonical format is lf endings.</div>

<div><br></div><div>So now you can see the problem: as soon as you touch a file Bazaar knows it has to compare the file to the repository to see if changes are made. It converts the line endings to "canonical" (lf - so no change for linux files) and compares to the repo.. But that was created with crlf endings - and hence the problem</div>

<div><br></div><div>I think this is one of the worst parts of Bazaar, it is really easy to destroy your repository by forgetting to install that rules file 8-( I've lost multiple days there fixing occurrences like that.</div>

<div><br></div><div>To fix your problem you can do two things:</div><div><br></div><div>1. You can checkout all of your files, use "touch" to mark all of them as changed and commit them back. This way all line endings in the repo change to canonical lf. Make sure you have nothing left to merge with or merge to, because everything after will be a conflict!!</div>

<div><br></div><div>2. You can change the "canonical" representation inside the repository to crlf:</div><div><pre style="overflow:auto;padding:5px;background-color:rgb(255,255,224);color:rgb(178,34,34);line-height:15px;border-top-width:1px;border-bottom-width:1px;border-style:solid none;border-top-color:rgb(170,204,153);border-bottom-color:rgb(170,204,153)">
[name *]
eol = native-with-crlf-in-repo</pre></div><div><br></div><div>Good luck,</div><div><br></div><div>Frits</div><div class="HOEnZb"><div class="h5"><div><br></div><div><br></div><div><br><div class="gmail_quote">On Thu, Jul 12, 2012 at 2:58 PM, Lucio Crusca <span dir="ltr"><<a href="mailto:lucio@sulweb.org" target="_blank">lucio@sulweb.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello *,<br>
<br>
I'm new to Bazaar (and to SCM systems in general). I'm trying to share a<br>
single Bazaar repository hosted on a Windows share with two developer<br>
workstations, one Windows, the other Linux, and I need the Linux workstation<br>
to convert line endings as needed between updates and commits.<br>
<br>
I'm the developer at the Linux box. Here is what I've written in my<br>
$HOME/.bazaar/rules file:<br>
<br>
[name *.png]<br>
eol = exact<br>
<br>
[name *.jar]<br>
eol = exact<br>
<br>
[name *.zip]<br>
eol = exact<br>
<br>
[name *.war]<br>
eol = exact<br>
<br>
[name *]<br>
eol = native<br>
<br>
However when I touch a single line in a file, bzr diff, bzr update, bzr commit<br>
see the whole file as it had been completely changed, I suppose because of the<br>
line endings.<br>
<br>
Assuming the problem was an empty $BZR_HOME, I also tried to<br>
<br>
$ export BZR_HOME=$HOME<br>
<br>
but nothing changed. I'm using Bazaar 2.6.0dev2.<br>
<br>
Any help?<br>
<br>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br>