Re: CVS Problems
"Matt Brozowski" <[email protected]> Tue, 3 Feb 2004 06:51:05 -0500
| Newsgroups | gmane.comp.ide.eclipse.plugins.wdte.devel |
|---|---|
| Message-ID | <001001c3ea4c$01f23350$0300a8c0@oemcomputer> |
Christopher Lenz wrote: > Am 03.02.2004 um 05:57 schrieb Matt Brozowski: > [snip] > > When creating a patch (using the pserver protocol at least), Eclipse > > sends the files that are modified to the CVS server and the server > > compares them to the files that are in the repository. It then sends > > the diff results back to be incorporated into the patch. The > > convention seems to be that, when file contents are sent to the > > server, lines are terminated with a LF in the Unix style. Therefore > > on Windows sytems CRLF files have the CRs stripped out. > > I'm not sure whether this is implemented on the client- or server-side, > but line-end conversion is a known and very helpful feature provided by > CVS. There are situations when it gets messed up, like when you work > with Cygwin in UNIX-text mode, or when you copy files from Windows to > Unix boxes. I have debugged the org.eclipse.team.cvs.core module and have seen that is removed the CRs when calling the cvs diff utility on the server. > > It appears that the files that are checked into CVS and stored in the > > repository for the CSS Editor are CRLF terminated. When the files are > > checked out the CRLF remain the files stored locally. After making a > > modification, and attempting the create a patch, Eclipse, recognizing > > that it is running on a Windows box, removes the CR when it sends the > > contents of the modified files back to the server. The CVS server > > then compares the CRLF version of the file in the repository with the > > LF only version that is sent from the client and as a result it thinks > > that every line is different. (Note that this doesn't happen on a Unix > > system because it does not attempt to the CRs from the communication, > > but the impact on a Windows system is that only completely > > unreasonable patches can be made.) > > > > It seems that all of the files that are currently in WDTE CVS have the > > CRLF in them. > > Hmm, I just checked here, and the files I checked out are LF terminated > (I'm on Mac OS X). I could imagine the line-endings being messed up > actually, because I've done part of the development on Windows boxes, > but AFAICT everything is okay. I used a regular command line 'cvs co' to check the files out onto a Solaris system I have in my office and have found that many of the files have CRLFs in them even on that system. (The file I was working with was CssAutoEditStrategy.java) > > I would recommend that all the files in CVS be converted to LF only > > files to avoid this problem in the future. > > Well, if that's really the problem I'll fix it ASAP. > > > Further I would be very interested to know how the files got checked > > in initially so we can be sure that Eclipse is not causing the trouble > > itself. > > About the CSS UI modules: They were checked out from the > csseditor.sf.net repository on a Windows box using Eclipse 3. Then I > modified the plugin IDs and package names and all that, and imported > them into CVS, still on a Windows box using Eclipse 3. I imagine that you were doing all of you work in extssh mode. This may be doing the conversion for you. If you find no problems that way, can you try pserver mode? > > I'm happy to do any futher investigation if any is necessary. > > I'll check out the sources on my Windows box in a couple of minutes and > investigate further. I'll look forward to hearing... :-) Matt Brozowski ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn