0

How to checkout a specific or a single file in repository using SharpSvn API????

s.ukreddy
  • 312
  • 2
  • 6

1 Answers1

1

Subversion doesn't allow checking out files by itself as the smallest working copy consists of a directory.

What you could do is the equivalent of

svn co http://my.example/repository/subdir --depth empty F:\scratch-dir
svn up F:\scratch-dir\file</code></pre>

This will give you a checkout of http://my.example/repository/subdir as F:\scratch-dir\file. This allows changing the file and committing changes to it. (This can be accomplished in SharpSvn by SvnClient.CheckOut() followed by SvnClient.Update() with the right arguments)

Another option is

svn cat http://my.example/repository/subdir/file > temp-file

Which will give you a read only copy of the file. (The SharpSvn equivalent of this is SvnClient.Write().)

Bert Huijben
  • 19,525
  • 4
  • 57
  • 73