简体   繁体   中英

How do I checkout a single file (not folder) from the SVN repository?

Currently I am working on a C#.net project (visual studio 2005). I could checkout a project from the SVN repository, make changes to a file and commit.

But, how can I specify the checkout depth (sparse checkout) and checkout a single file by using sharpSVN DLL? Please help.

Subversion clients do not, so far as I know, generally support single-file checkouts. You can certainly get a single file (with nothing more than a simple HTTP GET request to the URL), but checking back in changes will be more difficult.

The reason for this is that Subversion wants to create its metadata directories ( .svn ) to track properties, URLs, the old version of the file, etc. That's hard to do in a single file.

Like @derobert said, you cannot check out a single file. The best you can do is a non-recursive checkout of that file's directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM