Last-modified timestamp

chris.bartz at natinst.comchris.bartz chris.bartz at natinst.comchris.bartz
Fri Apr 17 08:45:57 PDT 1998


I am doing this myself right now, for the exact same reason you are.

You can change the date/time of the change after you submit it with "p4 change -f".
Of course, this applies to the entire change which in my case consists of only files
that have the exact same last modification time.  I have a perl script that checks in
the file for me and then modifies its date.

Unfortunately, Perforce has a bug that when you do this it only modifies the time of
the change, not the modification times of the files involved in the change.  I get
around this by hacking up the checkpoint of the database directly.  I have a perl
script for that too.

So, my procedure to fix up the timestamps is:

- - check the file in normally
- - do "p4 change -f" stuff to patch up the timestamp
- - checkpoint the database
- - fixup the timestamps in the checkpoint
- - recover from the fixed up checkpoint.

My Perl scripts are not in condition for general use (they make lots of assumptions
about how I have things) but I will send them to you it you want.

- -Chris Bartz





stephenng at alum.mit.edu on 04/17/98 04:26:36 AM

To:   perforce-user at perforce.com
cc:    (bcc: Chris Bartz/AUS/NIC)
Subject:  Last-modified timestamp




When I check out a file, I would like to restore the original
timestamp of the file--not the timestamp of when the changelist is
submitted, but the timestamp of when the file was last edited.
(I've read through the previous timestamp thread.  Don't ask me why I
need to do this!  It's for compatibility with another SCM system that
we are transitioning from.)
I'm willing to use "touch" in a perl script to do this, but it seems
as if the timestamp I want isn't even maintained by perforce.
Is there a way I can find out what this timestamp is (it needs to be
both the date and time, not just the time).









More information about the perforce-user mailing list