Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I clone a repository and preserve the file time stamps?

Tags:

mercurial

How can you get a copy of the source code from the server on a new machine, but preserve the file time stamps?

With the following procedure, all the time stamps are set to the current date/time.

  1. Manually create the root folder for the repository
  2. CD into it
  3. Perform an hg init
  4. Use TortiseHg to clone the repository from the server to the folder.

Is there an option, or different procedure that will preserve the time stamps?

In this specific case, using Kiln with TortoiseHg.

like image 924
Chris Vesper Avatar asked Oct 18 '11 14:10

Chris Vesper


1 Answers

You could use the Timestamp extension, if creating new "reference" timestamps will not be a problem. From its website:

It does this by means of a database file .hgtimestamp, residing in the repo's root and thus being versioned.

Other than this, I don't think it's possible.

I've read a little about Timestamp hook, and it seems to be exactly what you need.

like image 60
Geo Avatar answered Sep 28 '22 01:09

Geo