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

冷暖自知 提交于 2019-11-29 03:08:32
JesperE

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.

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

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!