Ignore a folder during SVN updates

前端 未结 5 968
轻奢々
轻奢々 2021-01-30 16:41

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 sh

相关标签:
5条回答
  • 2021-01-30 17:29

    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
    
    0 讨论(0)
  • 2021-01-30 17:30

    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.

    0 讨论(0)
  • 2021-01-30 17:35
    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

    0 讨论(0)
  • 2021-01-30 17:39

    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
    ...
    
    0 讨论(0)
  • 2021-01-30 17:45

    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.

    0 讨论(0)
提交回复
热议问题