Re: CVS file modtime reporting - bug or feature?
"kirillmueller" <[email protected]> Mon, 27 Mar 2006 17:56:26 -0000
| Newsgroups | gmane.comp.version-control.cvs.gui.devel |
|---|---|
| Message-ID | <[email protected]> |
--- In [email protected], Guy Rouillier <guyr-ml1@...> wrote: > > Oliver Giesen wrote: > >> Here's the scenario. Start with a file from CVS that is a > >> couple years > >> old, like AUTHORS or COPYING. The ModTime column properly > >> reports the > >> 2004 date. Now make a trivial change and save it. The file > >> timestamp > >> in the OS is of course updated to the current time, and that gets > >> reflected in the ModTime column. > >> > >> Finally, select this same file and use the "Update" command > >> to "get the > >> clean copy", i.e., revert back to the 2 year old version in CVS. It > >> correctly gets the CVS version, but the modtime both in the > >> filesystem > >> **and** in CVS/Entries is updated to the time you did the update, not > >> the original timestamp from CVS! > >> > >> Is this the way it has always worked, or is this a CvsNT bug? I > >> certainly wasn't expecting this behavior. > > > > Yes, that's the way CVS works (not only CVSNT). It only gets the original commit timestamp on initial Checkout, Update will always set it to the time of the last update. > > CVSNT nowadays has a -t option to the Update command (already surfaced in WinCvs on the Update Options tab) which will use the last commit timestamp instead but that requires a CVSNT server as well. > > Oliver, thank you for enlightening me. Sigh, one more thing to add to > the to-do list for gCvs. That's really odd, I wonder why CVS elected to > do it that way. It has the real timestamp, obviously, since it got it > on initial checkout. > > -- > Guy Rouillier > I suppose CVS does that to better integrate with build systems that rely on timestamps. Imagine a case like: - Change something - Build - Get the clean copy (cvs up -C) - Build The second build needs the affected files to be newer than at the time of the first build, or it will not happen. (At least VC++ 6.0 and GNU make show this behavior.) Kind regards, Kirill Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/cvsgui-dev/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/