info-cvs
[Top][All Lists]
Advanced

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

Re: Ignoring whitespace and CR/LF when checking into repository


From: Todd Denniston
Subject: Re: Ignoring whitespace and CR/LF when checking into repository
Date: Tue, 16 Nov 2004 09:30:29 -0500

Antony Paul wrote:
> 
> Hi all,
>    Is it possible to tell cvs to ignore difference in white space and
> CR/LF when committing changes to a file. This is creating lot of
> problems since different developers use different editiors and OS.
> 
> rgds
> Antony paul

1) you don't want CVS to ignore differences in white space. What you want is
for everyone to use the SAME coding style or code "beautifier" before checking
in[1]. My preference is for style, beautifiers tend to be what one person
(probably a manager who did not know better) chose instead of what the TEAM
agreed too.

2) Different OSs should not be a problem, if you use correct procedure.
correct procedure is, use the CVS client[4] made for the OS you are working
on, which shares the line ending paradigm of your OS and OS editing tools[3]. 
Note that sharing the repository over a network file-system [NFS or SMB] is a
_VERY_ _BAD_ idea, also sharing a workspace between OSs and using editors or
CVS on both systems in that workspace is a bad idea.


[1] you can check for this with commitinfo, but you only want to check and
allow or disallow checkin... the user should actually be forced to run the
beautifier BEFORE committing the code if you want to use commitinfo,
commitinfo should NEVER change the data being committed.  Having commitinfo
change data violates least surprise[2].

[2] http://en.wikipedia.org/wiki/Principle_of_least_astonishment
http://www.faqs.org/docs/artu/ch11s01.html

[3] http://lists.gnu.org/archive/html/info-cvs/2004-08/msg00156.html
http://lists.gnu.org/archive/html/info-cvs/2004-08/msg00144.html
http://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=line+ending&submit=Search%21&idxname=info-cvs&max=50&result=normal&sort=date%3Alate

[4] Note that I am only talking of the executable acting as the client end of
CVS, the one your user interacts with.  The server can be which ever version
of CVS that is made for the server, i.e., it can be the cvshome.org
version(cvs) or CVSNT.  
cvs clients can work with CVSNT servers, and CVSNT clients (AFAIK) can work
with cvs servers, though you may not have all of the newer capabilities of one
type or another available, the stuff you really need will work.

-- 
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane) 
Harnessing the Power of Technology for the Warfighter




reply via email to

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