How to checkout few files and folders alone without checking out entire source

前端 未结 4 1732
北海茫月
北海茫月 2020-12-16 11:58

In my project I have many folders. I certainly know I want have changes in only few files (around 15) each of them are in 7 different folders. Also, I don\'t want to checkou

相关标签:
4条回答
  • 2020-12-16 12:36

    Apart from just checking out the folders you want (which only works if you want the entire subfolder tree as well), Subversion 1.7 supports something referred to as "sparse directories". Basically you can checkout a folder to a certain depth, and then afterwards "drill down" into the folders you are interested in.

    Using the command line client, you use the --depth and --set-depth options to svn update. If you are using TortoiseSVN, there is a "Checkout Depth" option in the checkout dialog.

    EDIT: To clarify against your specific question, you would first to a checkout of your source tree with depth "immediates". This will give you all your folders, but they will initially be empty. Then you can drill down in the Extensions and Themes directories by updating them to "fully recursive" depth (svn update --set-depth infinity or in TortoiseSVN "Update to revision → Update Depth → "Fully Recursive").

    EDIT: The update depth can be seen as a sort of "visibility level", and is remembered by Subversion, i.e. if you do a svn update on your working copy, it will only update to the current visibility level.

    0 讨论(0)
  • 2020-12-16 12:36

    Yes, See if you have an Repository address like:

    https://elastik.svn.sourceforge.net/svnroot/elastik/
    

    Simply add the folder you want on to the end. So if I only want the "trunk/includes" folder:

    https://elastik.svn.sourceforge.net/svnroot/elastik/trunk/includes
    
    0 讨论(0)
  • 2020-12-16 12:41

    In the Tortoise navigator (right click) navigate to a specific folder and perform checkout against the location

    0 讨论(0)
  • 2020-12-16 12:52

    I know this question is more than 5 years old, but my answer may help those who are look at this question now.

    I'm using tortoise SVN verion 1.9, it has an option "choose items" before checkout. We can choose required folders / files to checkout from the repository browser.

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