I've been using SVN for a long time and I was in the habit of checking out the whole folder even if I needed a single file. This habit of mine was working well until I had to check out the folder with around 200 files with hundreds of megabytes of data. I then realized what I've been missing.
I tried to checkout single file but SVN wouldn't let me do that. From my perspective, it should be simple as checking out the folder, but it was not. There could be some reasonable explanation for this limitation but I needed to checkout the file and quickly finish my job. After spending few mins on the Internet, I found the solution and thought it would be wise to share it. So, here it goes.
- Right click on the folder in which you would like to check out the file and select 'SVN Checkout...' from the menu.
- In the Checkout screen, in URL of repository text box, fill the URL to the folder in the repository from which you would like to checkout the file.
- Select 'Only this item' from the drop down menu from 'Checkout Depth' in the same screen. Click 'OK' button.
- You can now see SVN overlay icon on the folder. Also, you will notice that the folder is still empty. Let's check out the single file now.
- Now, right click again on the same folder and select 'TortoiseSVN -> Repo-browser' from the menu.
- Repository Browser will take you directly to the folder from which you would like to checkout the file and you can see the files on the right hand side of the screen.
- Right click on the desire file and select 'Update item to revision' from the menu. Click 'OK' on the next screen. Voila, you have successfully checked out single file.
- If you have some more files (but not all) to checkout, repeat the last step.
Although it takes little time to check out a single or few files from the repository, I think it's worth doing this way rather than checking out the whole folder when the folder it huge in size. What do you think?