TortoiseHG / Mercurial 更新后本地文件的原始修改日期时间
我在 Windows 7 上运行 TortoiseHG 2.1.3。
是否可以将存储库“更新”到过去的特定时间点,并强制检索到的本地文件具有与它们之前相同的修改日期/时间坚定的?
目前,如果我“更新”到之前的时间点,所有涉及的文件都会被赋予“现在”的修改日期/时间。我理解为什么会发生这种情况,以确保 IDE 使用正确的文件进行构建(当它检查自上次构建以来发生了什么变化时)。
这不是一个主要问题,但当我尝试计算所需的最新文件时,这让我有点头疼。
I'm running TortoiseHG 2.1.3 on Windows 7.
Is it possible to "Update" a repository to a particular point in the past and force the local files that are retrieved to have a modified date/time identical to that of when they were committed?
At the moment, if I "update" to a previous point in time, all the file involved are given a modified date/time of "now". I understand why this is happening as to make sure the IDE builds using the correct files (when it checks to see what has changed since the last build).
This isn't a major problem, but causing me a bit of headache when I'm trying to work out the latest files that are required.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为
hg archive
(从命令行)会按照你想要的方式做一些事情。编辑:似乎是:Mercurial Distributed SCM(版本3.0.1)
所有存档文件的日期/时间戳都设置为请求的修订日期,而不是最近提交的日期/时间戳对于给定的文件。不是最有用的东西。看起来这确实与过去的工作方式有所不同。
目前,请参阅此扩展以获取一种可能的解决方案:
https://bitbucket.org/esskov/hg_timestamp_update/wiki/首页
I think
hg archive
(from command line) will do something along the lines of what you want.EDIT: It seems as of: Mercurial Distributed SCM (version 3.0.1)
That the date/timestamps of all archive files are set to the requested revision date, not to the date/timestamp of most recent commit for a given file. Not the most useful thing. It sure seems like this is a change from how it used to work.
See this extension for one possible solution currently:
https://bitbucket.org/esskov/hg_timestamp_update/wiki/Home
根据记录,答案很简单:“不”。
Mercurial 当前不保存文件的修改日期时间。
当您更新时,文件将设置为当前日期时间。可以使用扩展(如另一个答案中提到的)将它们设置为不同的日期时间,例如修订版的日期时间,但原始修改的日期时间消失了。
For the record, the answer is simply "no".
Mercurial does not currently save the modified date-time of the file.
And when you update, files are set to current date-time. It's possible with extensions (as mentioned in the other answer) to get them set to different date-times such as that of a revision, but the original modified date-time is gone.