使用 SVN 更改修订历史记录
我工作时源存储库中的一些文件被移动了。文件不是执行“svn mv $file”操作,而是使用“svn rm $old_location/$file”和“SVN add $new_location/$file”移动。
大多数文件的名称相同,但现在位于不同的目录中。有没有办法使用 SVN 添加回修订历史记录?我有旧文件位置到新文件位置的映射,因此如果我可以编写一个脚本来执行此操作,那就太好了。
Some files in my source repository at work were moved around. Rather than performing a "svn mv $file" operation, the files were moved using "svn rm $old_location/$file" and "SVN add $new_location/$file".
Most of the files are named the same, but are now in different directories. Is there a way to add back the revision history using SVN? I have a map of the old file locations to the new file locations, so it would be nice if I could write a script to do this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在发生这些不需要的移动之前,使用 svnadmin 转储您的存储库,直到修订版(在本示例中为 3500)。删除存储库并重新加载转储文件。
Use svnadmin to dump your repository until the revision, in this example 3500, before these unwanted moves took place. Delete the repository and reload the dump file.
也可以使用 dumpfilter 选项执行上述操作。
could also do the above with dumpfilter option.