I fixed this morning all those line termination problems in the new cvs module jakarta-velocity-tools.
I did a few tests to find out why these wrongly terminated files ended up in the repository. My best understanding is this: - CVS clients do tweak line terminator of text files in the same way the ftp protocol tweaks line terminators. So that's a feature not a problem. CVS clients make sure that you always have correctly terminated text files for your plattform. Since the tweaking is done in both directory (checkout and commit) everything is fine. - In the repository (cvs server) text files (should!) have UNIX-style line terminators (\x0A) - In our specific case, the problem was, that the repository contained some files with Windows-style line terminators (\x0D\x0A). When a Windows client checks out such a file, it unix2dos converts it, which makes out of \x0D\x0A the terminator \x0D\x0D\x0A. That is what Donnie Hall reported. The Windows files ended up in the repository because before the initial cvs import we intensively exchanged prototypes. That's probably when Windows and UNIX style files got mixed. Then, the initial import was done on a Unix-like plattform, which obviously does't take care of the necessary conversion of the Windows line terminator. In short: As long as you work on your plattform (be it Windows, Unix, Mac) with properperly terminated files for your plattform, all should be fine. CVS clients take care of the necessary line terminator conversions. Problems start when you exchange files outside cvs and then bring such these files into CVS on plattform other than the native plattform for these files. I hope we've beaten this horse to dead now. :-) Gabe Attila Szegedi wrote: > > You have exactly the same symptoms I had: not all, only some files exhibited this >behavior. (Maybe these were the Mac-edited files? Just a wild guess...) However, >everything got well after I: > 1. did a fresh cvs login with --crlf (without this, other commands (diff, checkout) >with --crlf will give you access denied. Weird but true.) > 2. did a cvs checkout with --crlf > > So yes, I guess you should use --crlf with all commands. I use it with login, >checkout, and diff -- the only commands so far I use, since I'm not a committer :-) > > Attila. > > ----- Original Message ----- > From: "Donnie Hale" <[EMAIL PROTECTED]> > To: "Velocity Developers List" <[EMAIL PROTECTED]> > Sent: 2002. janu�r 8. 3:23 > Subject: RE: [ANN] Struts + Velocity + Tools +... > > > This is good info, as I am using a Windows CVS client (TortoiseCVS). > > However, I don't see the problem on every file I've gotten from > > velocity-tools, so there's definitely some difference in the files that are > > in CVS even if how I'm retrieving them impacts how I see them. > > > > To make sure I understand, this option should be used for all cvs actions, > > checkout included? > > > > Thanks, > > > > Donnie > > -- Gabriel Sidler Software Engineer, Eivycom GmbH, Zurich, Switzerland -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
