[Top][All Lists]

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

Re: Updating local working directory

From: Mark D. Baushke
Subject: Re: Updating local working directory
Date: Wed, 05 Mar 2003 09:50:29 -0800

Iqbal Shaikh <address@hidden> writes:

> We have  a querry regarding checking out of files,
> When we checkout files on our local working directory, 
> the files are cheked out  with the date on the day that you check out
> ( but not with the date that the files were actually last edited).

A 'cvs log' command reports times in UTC (aka GMT). The timestamp of the
file in your local working directory will be in local time which is
likely to be different unless you are in the GMT timezone.

On most unix boxes, you can make your current shell inherit the UTC
timezone to do comparisons with the times reported by the 'cvs log'

For example:

bash$ cvs log -N -r1.12 cvs_2.html

RCS file: /cvs/www/www/docs/manual/cvs_2.html,v
Working file: cvs_2.html
head: 1.12
locks: strict
access list:
keyword substitution: kv
total revisions: 15;    selected revisions: 1
revision 1.12
date: 2002/12/28 01:25:42;  author: dprice;  state: Exp;  lines: +490 -280
* index.html: Tidy.  Update 1.11.2 links to 1.11.3.
* cvs*.html: Regenerated.
bash$ ls -l cvs_2.html 
-rw-r--r--  1 mdb  builder  143757 Dec 27 17:25 cvs_2.html
bash$ TZ=GMT ls -l cvs_2.html
-rw-r--r--  1 mdb  builder  143757 Dec 28 01:25 cvs_2.html
bash$ date
Wed Mar  5 09:48:15 PST 2003
bash$ TZ=GMT date
Wed Mar  5 17:48:34 GMT 2003
bash$ date -u
Wed Mar  5 17:48:38 UTC 2003

You will notice in the above that when I used the 'TZ=GMT ls ...'
command, the time matched that found in the date field of the 'cvs log'
> Is there a way to  update your local working directory with the dates 
> that the files were actually modified on.

No, the biggest consumer of cvs sources are software developers that use
'make' and 'make' wants to know when you have modified a file in your
current sandbox so that it may properly regenerate the objects derived
(like .o files and fully linked executables) from the source. For this
reason, 'cvs update' will choose to give the current file in the
repository the timestamp of the time in which the local file is

        -- Mark

reply via email to

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