2

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.

  • 1
    possible duplicate of [Checkout one file from Subversion](http://stackoverflow.com/questions/122107/checkout-one-file-from-subversion) – Gilles 'SO- stop being evil' Jan 04 '12 at 12:57
  • Checkout this post. [Checkout one file from subversion](http://stackoverflow.com/questions/122107/checkout-one-file-from-subversion/122291#122291) – Ken Sep 24 '09 at 14:35
  • This is not a duplicate of that post; this post specifically asks how to use SharpSVN to checkout a single file, the other does not mention SharpSVN or C# for that matter. – Robert Cardona Dec 17 '13 at 14:49

2 Answers2

4

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.

derobert
  • 49,731
  • 15
  • 94
  • 124
0

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.

Thilo
  • 257,207
  • 101
  • 511
  • 656