如何克隆存储库并保留文件时间戳? [英] How do I clone a repository and preserve the file time stamps?

查看:97
本文介绍了如何克隆存储库并保留文件时间戳?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从新计算机上的服务器获取源代码副本,但保留文件时间戳?

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. 为存储库手动创建根文件夹
  2. 将CD放入其中
  3. 执行hg init
  4. 使用TortiseHg将存储库从服务器克隆到文件夹.
  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?

在这种情况下,将窑与TortoiseHg结合使用.

In this specific case, using Kiln with TortoiseHg.

推荐答案

如果创建,则可以使用时间戳扩展新的参考"时间戳不会有问题.在它的网站上:

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

它通过数据库文件.hgtimestamp来执行此操作,该文件位于 回购的根,因此被版本化.

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, it seems to be exactly what you need.

这篇关于如何克隆存储库并保留文件时间戳?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆