gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] tla changes --diffs question


From: John A Meinel
Subject: Re: [Gnu-arch-users] tla changes --diffs question
Date: Fri, 05 Nov 2004 08:32:51 -0600
User-agent: Mozilla Thunderbird 0.9 (Windows/20041103)

address@hidden wrote:
Quoting Jani Monoses <address@hidden>:


address@hidden wrote:

Greetings,

I am a recent user of arch (using cygwin and

tla 1.2.1)
and I find it excellent for my needs. One

problem
though that I found is that when I do some

changes
inside some file and issue a
    tla changes --diffs
I don't see just the changes made for _some_

files, I
see the files almost in duplicate, first the

old file
with - before each line and then the new file

with +
before each line. Normally I think I should

see just
the 2-3 changed lines, not the whole file ...

anyone
knows why is that and what can I do to solve

it ?
Could be that line endings changed from unix to
win and that causes the noise?
I did not use tla under cygwin so it might be
something particular to that port


Hi Jani,

I am indeed editing everything except the logfile under Windows not using cygwin so each line ends with CR+LF, but I don't see why this should matter to diff, although is the only explanation that passes through my head.

I also noticed that this behaviour is not for all files, just for some of them.
Regards,
Andrei



There is a bug in some of the latest tla-cygwin distributions where some of the files get opened in binary mode, and others get opened in text mode. So that when it looks at changes, the "original" file looks like just LF, while the modified file has CR+LF.

It has been mentioned in the past (by me), I'm not sure if there is work being done on it yet.

Be careful, as committing with this binary can lead to corrupted archives. (The problem is a patch that converts line endings won't apply if the line-endings are already converted.) I have found some workarounds to it, but it really just needs to be fixed.

I personally have 2 workarounds. First, I reverted to a slightly older version of the binaries which seems to not have the problem. (I believe this is the 1.2 versus the 1.2.1. If you still had problems, I could post a tarball somewhere of what I use.)

Second, I personally prefer LF endings anyway, so I wrote a pre-commit hook script that will abort the commit if it finds files that are of the wrong form. There are some files which have to be CRLF, such as visual studio project files, so the script is configurable about how it treats files.

Also, I have found that on cygwin, the mode of my files changes a lot. Editing a file with a windows program seems to like to set the execute bit, so my precommit hook also watches for that. But not all editors caused this problem, so you may not run into it.

This could easily be much more than you need, though. And might not even be what you want.

By the way, which version of tla are you using? The dirname, or the dos8.3? Lode Leroy claims that dos8.3 works well and is very fast, but for some reason on my machine, it keeps creating files in their 8.3 form instead of their full form. It doesn't do this to *all* files, though, which is what is really weird.

I keep meaning to get into this myself, as I would like to see the whole project change from a collection of patches into an actual arch repository, and maybe even get updated to the latest tla.

At one point address@hidden had been working on it, and I wanted to branch off of his work. However, at the time I couldn't get his code to compile for me.

I'm sure it will get sorted out, though. Just might take a little time. (It's kind of a shame 1.2 works for me, or I'd be more motivated to make 1.2.1 work. In the meantime, I have to get *real* work done.)

John
=:->

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]