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

查看:178
本文介绍了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文件以外的所有内容,以确保删除的文件不遗留下来

    • 将存档解压缩为工作副本

    • 将系统日期更改为t存档日期

    • 根据需要添加和删除并提交到本地存储库中

    • install VisualSVN server on my workstation
    • create a new "local" SVN repository
    • take archives one by one, for each:
      • in the working copy delete everything but .svn file, to make sure files which were deleted are not left over
      • decompress the archive into the working copy
      • change system date to the date of the archive
      • add and delete as necessary and commit into the local repository

      与安装 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天全站免登陆