在 SVN 更新期间忽略文件夹
如果我 svn:ignore 一个非常大的文件夹,它会提高 SVN 更新期间的性能吗?
我的项目中有一个非常大的(> 600MB)文件夹。该文件夹中的文件不应发生任何更改。问题是每次我调用“svn update”都会花费很长时间。有没有办法在更新过程中忽略此文件夹以加快更新过程?
If I svn:ignore a really big folder will it improve performance during SVN updates?
I have this really massive (>600MB) folder in my project. The files in this folder should not be changing at all. The problem is that every time I call "svn update" it takes forever. Is there a way to ignore this folder during updates to speed up the update process?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
svn:ignore
仅适用于 Subversion 存储库中尚未存在的文件。该文件夹已经存在。您可以使用
svn update --set-深度排除
folderName
从工作目录中删除此文件夹:下次进行更新时, bigFolder不会显示在您的工作目录中。如果你想恢复它,你必须重置深度:
The
svn:ignore
is only for files that are not already in the Subversion repository. This folder already is.You can use the
svn update --set-depth exclude
folderName
to remove this folder from your working directory:Next time you do an update, bigFolder won't show up in your working directory. If you want it back, you'll have to reset the depth:
您可以执行 svn update 并特别提及所有其他目录,例如
,或者 grep -v 输出您不想要的内容。
或者,将 big_dir svn mv 放入另一个文件夹并更改构建系统以从其他目录获取内容。
You could do an svn update and specifically mention every other directory, e.g.
Or, grep -v out what you don't want.
Or, svn mv the big_dir up into another folder and change your build system to get the content from the other directory.
只需执行以下操作:
使用“svn ls”您不仅可以更新本地现有的目录和文件,还可以更新存储库中的新文件。所以,更新比仅仅排除更完整。而且您不需要删除已经存在的文件,就像“--set-深度排除”显然所做的那样。
Just do :
Using "svn ls" You could update not only locally existing directories and files, but new files from repository. So, update is more complete, than just exclude. And You don't need to delete already existing files, like "--set-depth exclude" apparently does.
除了 @Bill Brasky 所说的之外,一个建议是将巨大的文件夹移动到外部文件夹中。这样你就可以执行
svn up --ignore-externals
如果你不希望工作副本中存在巨大的文件夹,你可以看看稀疏结账:
Apart from what @Bill Brasky said, one suggestion is to move the huge folder into an external. That way you can do
svn up --ignore-externals
If you don't want the huge folder in your working copy, you can have a look at sparse checkouts:
首先在结帐时,使用立即数,仅结帐第一级文件夹和文件:
然后,设置一些文件夹以供稍后更新:
ok,现在只有文件夹123能够更新,其他一级文件夹仍然保留在主干文件夹中
first when checkout , use immediates , only checkout first level folder and files :
then , set some folder for update later:
ok, now noly folder 123 will be able to update, and other first level folder still remain in the trunk folder