在 SVN 更新期间忽略文件夹

发布于 2024-11-06 11:40:44 字数 158 浏览 0 评论 0原文

如果我 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 技术交流群。

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

发布评论

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

评论(5

ぇ气 2024-11-13 11:40:44

svn:ignore 仅适用于 Subversion 存储库中尚未存在的文件。该文件夹已经存在。

您可以使用 svn update --set-深度排除 folderName 从工作目录中删除此文件夹:

$ svn update --set-depth exclude bigFolder  #Removes "bigFolder" from workdir
D bigFolder

$

下次进行更新时, bigFolder不会显示在您的工作目录中。如果你想恢复它,你必须重置深度:

$ svn update --set-depth infinity
U bigFolder
U bigFolder/File1
U bigFolder/File2
...

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:

$ svn update --set-depth exclude bigFolder  #Removes "bigFolder" from workdir
D bigFolder

$

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 --set-depth infinity
U bigFolder
U bigFolder/File1
U bigFolder/File2
...
山田美奈子 2024-11-13 11:40:44

您可以执行 svn update 并特别提及所有其他目录,例如

svn update dir1 dir2 dir3

,或者 grep -v 输出您不想要的内容。

svn update `ls | grep -v big_dir`

或者,将 big_dir svn mv 放入另一个文件夹并更改构建系统以从其他目录获取内容。

You could do an svn update and specifically mention every other directory, e.g.

svn update dir1 dir2 dir3

Or, grep -v out what you don't want.

svn update `ls | grep -v big_dir`

Or, svn mv the big_dir up into another folder and change your build system to get the content from the other directory.

忆伤 2024-11-13 11:40:44

只需执行以下操作:

svn up `svn ls | grep -v big_dir`

使用“svn ls”您不仅可以更新本地现有的目录和文件,还可以更新存储库中的新文件。所以,更新比仅仅排除更完整。而且您不需要删除已经存在的文件,就像“--set-深度排除”显然所做的那样。

Just do :

svn up `svn ls | grep -v big_dir`

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.

许仙没带伞 2024-11-13 11:40:44

除了 @Bill Brasky 所说的之外,一个建议是将巨大的文件夹移动到外部文件夹中。这样你就可以执行 svn up --ignore-externals

如果你不希望工作副本中存在巨大的文件夹,你可以看看稀疏结账:

svn checkout repo . --depth empty
svn up other dirs

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:

svn checkout repo . --depth empty
svn up other dirs
々眼睛长脚气 2024-11-13 11:40:44
svn file structure:
trunk
|___ folder1
|___ folder2
|___ folder3
|___ other_folder

首先在结帐时,使用立即数,仅结帐第一级文件夹和文件:

  • svn co svn://svn-xxxx.com/svn/develop/trunk --深度立即数 trunk,

然后,设置一些文件夹以供稍后更新:

  • cd trunk
  • svn upfolder1folder2folder3 --set-depthinfinity

ok,现在只有文件夹123能够更新,其他一级文件夹仍然保留在主干文件夹中

svn file structure:
trunk
|___ folder1
|___ folder2
|___ folder3
|___ other_folder

first when checkout , use immediates , only checkout first level folder and files :

  • svn co svn://svn-xxxx.com/svn/develop/trunk --depth immediates trunk,

then , set some folder for update later:

  • cd trunk
  • svn up folder1 folder2 folder3 --set-depth infinity

ok, now noly folder 123 will be able to update, and other first level folder still remain in the trunk folder

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