SVN commit with old date/time

后端 未结 3 1834
忘了有多久
忘了有多久 2020-12-03 15:15

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

I have some archived sources which are very

3条回答
  •  独厮守ぢ
    2020-12-03 15:43

    What I did eventually was:

    • 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
    • once done, use svnadmin dump the repository
    • on the main SVN server load the dump using svnadmin load

    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.

提交回复
热议问题