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

房东的猫 提交于 2019-12-22 05:14:34

问题


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.


回答1:


You could use the Timestamp extension, if creating new "reference" timestamps will not be a problem. From it's 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.

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



来源:https://stackoverflow.com/questions/7809027/how-do-i-clone-a-repository-and-preserve-the-file-time-stamps

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!