更改 SVN 修订的时间戳 [英] Change the timestamp of an SVN revision

查看:95
本文介绍了更改 SVN 修订的时间戳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的电源出现故障,导致 UPS 耗尽,随后关闭了我们的 SVN 机器.开机备份时,系统时间不对.

We had a power failure that exhausted our UPS and subsequently shutdown our SVN machine. When it booted back up it, the system time was incorrect.

不幸的是,直到有些人已经提交了更改,这才被发现.所以现在我们有了一些比第一次修订早几年的修订.

Unfortunately, this was not caught until some people had already committed a changes. So now we have a few revisions that predate the first revision by several years.

有没有办法更正这个日期,所以一切正常?

Is there a way to correct this date, so things are in order?

推荐答案

日期/时间是修订的属性.找出修订号(或使用 HEAD),并使用 propset 或 propedit 和 --revprop 进行修改.

The date/time is a property of the revision. Figure out the revision number (or use HEAD), and modify it with propset or propedit and --revprop.

svn propset svn:date 'YYYY-MM-DDTHH:MM:SS.MMMMMMZ' --revprop -r HEAD /path/to/wc/file

您必须尝试使用​​它才能获得正确的设置组合.您还可以查看红皮书,位于 高级属性.(我链接到 1.4,请根据您的版本进行调整).

You'll have to play around with it to get the right combination of settings. You can also look at the Red Book, under Advanced Properties. (I linked to 1.4, adjust to suit your version).

这篇关于更改 SVN 修订的时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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