Jump to content


Preserving original file modification date

preserving file date

  • Please log in to reply
2 replies to this topic

#1 P4_Paul

P4_Paul

    Newbie

  • Members
  • Pip
  • 1 posts
  • LocationSouthern California

Posted 02 April 2014 - 03:47 PM

I am new to Perforce so I apologize for my lack of understanding.

I have a requirement that the original file date, specifically the file last modified date is preserved when add to the Perforce depot.

I have experimented with adding and submitting a workspace into an empty depot successfully, however when I sync or edit the depot back into a workspace the file dates are all the submit date and I appears the original file dates are lost?

Is there a method or option to preserve the original file dates specifically the last modified date?

Thank you in advance for your help,
Paul

#2 jrep

jrep

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 02 April 2014 - 06:36 PM

Set the "file type" to "text+m":
  • p4 edit -t +m myfile.txt
  • p4 submit -d"Setting preserve-file-timestamps type" my file.txt
Reference: http://www.perforce.....html#DB5-18921

#3 P4Sam

P4Sam

    Advanced Member

  • Members
  • PipPipPip
  • 484 posts
  • LocationSan Francisco, CA

Posted 02 April 2014 - 06:51 PM

The other option is to set the "modtime" option in your client spec.  This will cause the original file modtime to be set on every file you sync to that workspace.  (The "+m" filetype forces the "modtime" behavior on a per-file basis, regardless of client option.)





Also tagged with one or more of these keywords: preserving, file, date

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users