SVN 提交旧日期/时间 [英] SVN commit with old date/time

查看:27
本文介绍了SVN 提交旧日期/时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以使用旧的时间/日期提交到 SVN 存储库中,或者如何在提交后编辑时间/日期?

Is there some way how to commit into the SVN repository with old time / date or how to edit the time / date post commit?

在我开始使用 SVN 之前,我有一些非常古老的存档源,现在我想将它们放入 SVN 中,如果可能的话,保留它们的原始日期,以便 SVN 历史记录与实际日期匹配文件被编辑.

I have some archived sources which are very old, way before I have started using SVN, and I would now like to put them into the SVN and if possible to preserve their original date, so that SVN history matches the real date where files were edited.

操纵 SVN 服务器时间是一个明显的选项,但不能在这里使用,因为 SVN 服务器不受我控制.

Manipulating SVN server time is an obvious option, but it cannot be used here, as the SVN server is out of my control.

推荐答案

我最终做的是:

  • 在我的工作站上安装 VisualSVN 服务器
  • 创建一个新的本地"SVN 存储库
  • 一份一份的归档,每一份:
    • 在工作副本中删除除 .svn 文件以外的所有内容,以确保不会留下被删除的文件
    • 将存档解压到工作副本中
    • 将系统日期更改为存档日期
    • 根据需要添加和删除并提交到本地存储库

    对我来说,上面的步骤比安装 pre-revprop-change 钩子更容易.(我们目前拥有的只允许编辑日志消息.)

    The steps above seem easier to me than installing the pre-revprop-change hook. (The one we currently have in place allows editing log message only.)

    注意:除了更改系统日期之外,还可以在加载之前编辑转储文件中的日期.

    Note: instead of changing system date it would be also possible to edit the date in the dump file before loading it.

    这篇关于SVN 提交旧日期/时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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