I am building a web application to check files and folders existance in SVN repository, I have to access to the repository structure and search files in subdirs. Access is through network. NB : There is no local connection to svn respository, it's a web application. I am using sharpSVN, I found a way to access to local repository but not through a network. Any solutions ?
Asked
Active
Viewed 1,598 times
1 Answers
3
SharpSvn has various clients. You seem to be using SvnWorkingCopyClient
, which requires a local working copy.
You're looking for just SvnClient
:
var client = new SvnClient();
SvnInfoEventArgs info;
client.GetInfo(targetUri, out info);
Now you can read your info from info
.

CodeCaster
- 147,647
- 23
- 218
- 272
-
Aha ok but i found this code and it lets me to access to the root! http://stackoverflow.com/questions/1061016/sharpsvn-read-all-filenames – AtefB Feb 27 '15 at 14:50
-
do you mean that the solution is to work with the repository copy stored on the local machine running the app ?? – AtefB Feb 27 '15 at 14:55
-
i have an access to an SVN server, i have to build a web application that connect to SVN, browse dirs there and serach files, my client requires that I do not use the copy of the svn directory on the local machine, but to work on the copy stored on the svn server. Is it possible ? – AtefB Feb 27 '15 at 15:06
-
@your removed comment: that's because the [`GetList()` method demonstrated here](http://stackoverflow.com/questions/1061016/sharpsvn-read-all-filenames) isn't recursive. You have to check the `item.Entry.NodeKind` for each entry, and if it's a directory, dig deeper. – CodeCaster Feb 27 '15 at 15:21
-
aha ok, i tryed to make it recursive but everytime i have to create System.IO.DirectoryInfo or System.IO.Filenfo with the folder path and it doesn't work because it's unfound path. – AtefB Feb 27 '15 at 15:30
-
You can pass Depth Infinity on the args object, to make it fully recursive... but make sure you don't run out of memory using GetList(). Using List() and a callback allows avoiding that problem, and produces results directly instead of when everything is done. – Bert Huijben Apr 04 '15 at 22:25