开发者

Is there any specific library that would let me download single file from SVN repository?

I'm looking开发者_开发知识库 for a .NET library that would let me download a single file from an SVN repository. Do you know any?

All I want is to connect to server, find a file there and download it.

I know SharpSVN, SVN.Net, dotSVN, those are SVN implementations and I know, that I could 'hack' them by checking out repo and exporting file. This solution is last resort.


If your SVN repo is accessible through HTTP, you just need to open a HTTP connection to the appropriate URL (and authenticate if necessary), and download the file. If another protocol is used, then it'll be more complex.


You don't need to checkout the repository to export a single file. So, if any of the libraries supports svn export, you should be fine.


You should know that SVN over HTTP is implemented as a WebDAV service, and WebDAV is a form of augmented HTTP. In theory, you should be able to download the file with a simple web request.

Take this link, for example, which issues a simple GET right into an existing SVN repository. You should be able to craft such an url for the file that you need. In fact, it's how SVN urls are made in the first place, unless you're working over the svn or svn-over-ssl protocol.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜