使用 SVN 更改修订历史记录

发布于 2024-10-02 14:16:24 字数 211 浏览 0 评论 0原文

我工作时源存储库中的一些文件被移动了。文件不是执行“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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

厌味 2024-10-09 14:16:24

在发生这些不需要的移动之前,使用 svnadmin 转储您的存储库,直到修订版(在本示例中为 3500)。删除存储库并重新加载转储文件。

svnadmin dump RepositoryURL -r0:3500 > svn.dump
rm URL
svnadmin load RepositoryURL < svn.dump

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.

svnadmin dump RepositoryURL -r0:3500 > svn.dump
rm URL
svnadmin load RepositoryURL < svn.dump
醉南桥 2024-10-09 14:16:24

也可以使用 dumpfilter 选项执行上述操作。

could also do the above with dumpfilter option.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文