如何在 Subversion 上保留原始文件 [commit] 时间戳? [英] How can I keep the original file [commit] timestamp on Subversion?

查看:22
本文介绍了如何在 Subversion 上保留原始文件 [commit] 时间戳?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想确保,如果我从一台机器在 Subversion 中提交某些内容,然后在另一台机器上签出,我将获得相同的日期时间和时间戳值.

I want to be sure that if I commit something in Subversion from one machine, and I checkout on another, I will get the same value for datetime and timestamp.

目前我观察到文件修改的日期时间是我做同步的那一刻,而不是原来的值.

Currently, I observed that the datetime of file's modification is from the moment when I did the synchronisation instead of the original value.

对我来说,知道文件何时同步没有任何意义 - 我只想查看上次提交时间.

For me, it doesn't make any sense to know when the files were synchronised - I just want to see the last commit time.

此问题与时区无关.

推荐答案

可以在.subversion/config中设置:

[miscellany]
use-commit-times = yes

虽然如果我们谈论源文件,你会产生奇怪的副作用.

Although you will have strange side effects if we are talking about source files.

例如,您构建软件并执行svn update.现在更新文件的时间戳比构建结果文件的时间戳更旧,即使某些源文件发生更改,它也不会重新构建.请务必小心使用此设置.

For example, you build your software and do svn update. Now the timestamp of the updated files is older than the timestamp of the build result file, and it won't be rebuilt even though some source files changed. Be very careful with this setting.

这篇关于如何在 Subversion 上保留原始文件 [commit] 时间戳?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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