info-cvs
[Top][All Lists]
Advanced

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

Re: cvs commitinfo - remote access issues - enforced code beautification


From: Greg A. Woods
Subject: Re: cvs commitinfo - remote access issues - enforced code beautification
Date: Thu, 21 Mar 2002 15:01:23 -0500 (EST)

[ On Thursday, March 21, 2002 at 10:26:07 (-0500), Larry Jones wrote: ]
> Subject: Re: cvs commitinfo - remote access issues - enforced code 
> beautification
>
> No, commit does a checkout to expand keywords -- see checkin.c starting
> at the comment that says:
> 
>             /* The checkin succeeded.  If checking the file out again
>                would not cause any changes, we are done.  Otherwise,
>                we need to check out the file, which will change the
>                modification time of the file.

Ah ha!  There's the comment (and code) I was looking for!  Thanks for
the pointer!

>                The only way checking out the file could cause any
>                changes is if the file contains RCS keywords.  So we if
>                we are not expanding RCS keywords, we are done.  */

This part of the comment is very telling w.r.t. the assumptions about
what _should_ be happening!  ;-)

> However, I would have expected that checkout to send a diff, but it
> appears that it actually sends the whole file, which makes the kludge in
> question work.

>From what I can understand of the code now it would seem this kludge
will only work if keywords are expanded (and maybe only if the resulting
expansion is different?), _and_ if '-ko' and/or '-kb' are not set (and
preserve_perms is not true).  The actual test following that comment
only compares the current copy of the working file on the server
(i.e. the copy that would have been modified by the program(s) called by
commitinfo prior to checkin) with the just checked in revision.

>  It's also highly inefficient, so I wouldn't count on it
> continuing to work in the future (although I, for one, don't have any
> immediate plans to change it).

Sending a diff would be much more efficient!  ;-)

(lots of people use keywords, and usually in almost all of their files,
and thus for all of them to always have to get new copies of their files
after every checkin is quite a waste....)

-- 
                                                                Greg A. Woods

+1 416 218-0098;  <address@hidden>;  <address@hidden>;  <address@hidden>
Planix, Inc. <address@hidden>; VE3TCP; Secrets of the Weird <address@hidden>



reply via email to

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