颠覆中的慢速切换 [英] Slow switch in subversion

查看:30
本文介绍了颠覆中的慢速切换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的存储库中有一个从主干分支出来的项目.它已经存在了大约 18 个月,并且有大约 500 次修订.在此期间对主干所做的所有更改都一直合并到分支中.

We have a project in our repository that is branched off of the trunk. It has existed for about 18 months and has about 500 revisions committed to it. All changes to the trunk durring that time have been consistently merged into the branch.

此时,当我们在两者之间运行切换操作时,它需要超过两分钟,并且似乎在某些特定文件上停顿.

At this point when we run a switch operation between the two it takes upwards of two minutes and seems to stall on some particular files.

为了测试,我没有成功删除所有合并信息.

For testing I have removed all merge info with no luck.

作为进一步的测试,我从主干创建了一个新分支.然后我合并了原始分支和主干之间的差异,并将它们提交到新分支中.

As a further test, I created a new branch off of the trunk. I then merged the differences between the original branch and the trunk and committed them into the new branch.

根据 svn 实用程序,新的和旧的分支现在是相同的.

The new and the old branches are now identical according to the svn utilities.

如果我在主干和新分支之间切换,则没有速度问题.

If I switch between the trunk and the new branch, there are no speed issues.

似乎 repo 中可能有某些原因导致了这种情况.此时我唯一能想到的是,由于分支上有很多历史记录,因此系统会比较每个修订版.

It seems like there may be something in the repo causing this. The only thing I can think of at this point is that, since there is a lot of history on the branch, the system is comparing every revision.

我们使用的是 svn 1.6 并通过文件:协议进行操作.

We are using svn 1.6 and operating through the file: protocol.

有什么想法吗?

推荐答案

切换要求首先检查文件是否有本地修改.这是通过比较文件的最后写入时间来完成的.该检查很快,但如果某些文件的上次写入时间已更改,但没有进行任何修改(例如,文件已修改、保存,然后修改被撤消并再次保存),则该检查需要更长的时间SVN必须对文件内容进行逐字节比较.

Switching requires that the files are first checked for local modifications. This is done by comparing the last-write-times of the files. That check is fast, but if some files have their last-write-time changed but then don't have any modifications (e.g., file modified, saved, then the modifications were undone and saved again), then that check takes much longer since SVN has to do a byte-by-byte comparison of the file content.

要修复"那些可能出错的上次写入时间,运行清理命令会有所帮助.

To 'fix' those last-write-times that might be wrong, running the cleanup command would help.

这篇关于颠覆中的慢速切换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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