svn checkout depth

前端 未结 2 1093
渐次进展
渐次进展 2021-01-30 04:03

I have an SVN project with tree like this:

/project
    /dir1
        /subdir1
           -file1
           -file2
            .....
        -file1
        -file         


        
相关标签:
2条回答
  • 2021-01-30 04:36

    1) svn up --set-depth empty file/folder path

    // it will delete the file from your system

    2) svn up --set-depth infinity file/folder path

    // it will regenerated the file from svn server to your local system

    0 讨论(0)
  • 2021-01-30 04:55

    What you need is called sparse checkout.

    In your case you can:

    svn co --depth files file:///project project
    cd project
    svn up --set-depth infinity dir1 dir2 dir4
    svn up --set-depth empty dir3
    svn up --set-depth infinity dir3/subdir1 dir3/subdir3
    

    Can I add subdir2 to dir3 after a checkout?

    Yes: svn up --set-depth infinity dir3/subdir2

    How can I update working copy created this way? Will normal "svn up" command update only these folders or full update of project will be performed?

    Yes, svn up will update only these files and folders, that is update depth will be preserved.

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