[cvsnt] CRLF problem in CVS/Root file

jean-michel.rouet at philips.com jean-michel.rouet at philips.com
Wed Mar 24 11:12:32 GMT 2004


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Hi all, 

I update recently my cvs server to a 2.0.34 CVSNT version (my previous one 
was 1.x ?)
In my group some people are using the cygwin cvs as client and it seems to 
pose some problem with line endings in CVS/* files

here is the description of the bug on a windows machine using cygwin cvs

rouet at joebar /tmp/test/hello>which cvs
/usr/bin/cvs

rouet at joebar /tmp/test/hello>cvs version
Client: Concurrent Versions System (CVS) 1.11.6 (client/server)
Server: Concurrent Versions System (CVSNT) 2.0.34 (client/server)

rouet at joebar /tmp/test/hello>ls
CVS/  test.c  test.h

rouet at joebar /tmp/test/hello>cat CVS/Root
:pserver:rouet at joebar:/Test

rouet at joebar /tmp/test/hello>od -c CVS/Root
0000000   :   p   s   e   r   v   e   r   :   r   o   u   e   t   @   j
0000020   o   e   b   a   r   :   /   T   e   s   t  \r  \n

Here you see that the CVS/Root file is CRLF (windows) line ended.

if I then try a cvs command, like cvs update, it fails:

rouet at joebar /tmp/test/hello>cvs update
cvs [update aborted]: unrecognized auth response from joebar: cvs server: 
E cannot open F:/CVSRepository/Test^M/CVSROOT/config: Invalid argument

You see that the ^M is problematic maybe because the client told cvsnt 
server to take the CVSROOT as "/Test\r" instead of "/Test"
This was not a problem with previous versions of CVSNT because maybe it 
discarded automatically the \r (CR) from the CVSROOT

now if I unix2dos the CVS/Root file it solves the problem. Nevertheless as 
I do not know first why the files are sometime CRLF and sometime LF only 
on checkouts, and secondly I do not want to tell each user to convert 
locally their CVS/Root files with dos2unix, I'd like to know wheter this 
could be patched in CVSNT 2.0.34 (or cvs cygwin client 1.11.6).

rouet at joebar /tmp/test/hello>dos2unix CVS/Root
CVS/Root: done.
rouet at joebar /tmp/test/hello>od -c CVS/Root
0000000   :   p   s   e   r   v   e   r   :   r   o   u   e   t   @   j
0000020   o   e   b   a   r   :   /   T   e   s   t  \n

Here you see that the CVS/Root file is LF (unix) line ended.

then if I do : cvs update it works correctly

rouet at joebar /tmp/test/hello>cvs update
cvs server: Updating .


Regards
JM




More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook