CRLFs and Update/Checkout

Jeff Cantin <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.javacvs.devel
Message-ID <[email protected]>
Hey all. 

My group has been using the Javacvs library for a while with some
internal config mgmt tools, and it's been working well. It has a nice
API, broad featureset and even seems to work well with multiple
threads. One problem has been lingering, though, and no rearranging
of commands or local settings has been able to fix it. I'll try to
relay the problem with a situation: 

1. Checkout a module on your computer into directory A. 
2. Have someone else checkout, modify, and commit the module on
another computer. 
3. Run an update on your computer in directory A. 

4. Checkout the same module into directory B (after the changes are
made). 
5. Compare the files in the two directories. 

The problem is that remote modifications are not always picked up by
an update - a persistent issue for us. Running another checkout into
the same directory (which is similar to update anyway) results in the
same problem. Setting the checkout to read-only and read-write
doesn't affect it. The only way to get the right versions when there
are problems is to wipe the directory and re-checkout. 

The update appears to 'fail' because it thinks the local files are
modified. Sometimes this results in a conflict, but usually it
appears that the files just don't change. Knowing java and CVS, the
real issue could be in several places, but this is only showing up
for us on Win32 boxes, implying some file-format or CRLF problem (go
Bill). I've also heard from an Ant developer that one of the reasons
they're using command-line cvs for their CVS task was licensing and
CRLF issues in the Java cvs APIs. 

I tried to spend a few hours last week digging into the lib code, but
all I could come up with is speculation. It looks like text files are
pulled from CVS and written locally with the OS-default line ending,
so they should be written correctly to disk. Perhaps the problem is
in the diff stage where the line is compared against CVS, and where
there could be an extra char at the end of the line. I'm going to try
to spend some more time this week poking around; anyone else's
feedback would be a great help. 

thanks
Jeff



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.