This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: CVS conflict avoidance


In article <Pine.HPP.3.95q.980205104009.7139N-100000@bharh59a.europe.nortel.com>,
Mark Phillips  <M.S.Phillips@nortel.co.uk> wrote:

> I tend to think CVS should be preserving repositary (version) timestamp 
> on the destination file, if they are identical.
[...]
> Maybe this should be reported to the CVS maintainers as a bug?!

Don't bother -- this is the intended behavior.  I saw it discussed in
the CVS FAQ.  The rationale is as follows.  Suppose that CVS behaved
as you propose.  Now the following time line of events occurs:

    January 1	You check out the sources with "cvs co", but don't
		compile them yet because you're too busy.

    January 2	Somebody commits some new changes to various files
    		in the CVS repository.

    January 3	You get a free moment during lunch, and compile your
    		checked-out sources.

    January 4	You update your sources with "cvs upd", and do
    		another "make".

In this scenario, your object files would have time stamps from
Jan. 3, but your updated files after the "cvs upd" would have time
stamps from Jan. 2.  Thus make wouldn't recompile your updated sources
as it should.

This is the reason that CVS syncs the timestamps only on an initial
checkout.  When merely updating an existing file, it allows the time
stamp to be set to "now".

CVS has plenty of warts.  But I think the implementors did the right
thing in this case.

(I had to learn all these gory details when I was developing CVSup.)

John
--
   John Polstra                                       jdp@polstra.com
   John D. Polstra & Co., Inc.                Seattle, Washington USA
   "Self-knowledge is always bad news."                 -- John Barth


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]