0

I want to search for .sln and .java files from a given remote URL: something like http://olfandsub1.olf.com/nyts/.

I tried the code below used to read all files but it isn't working. Could you please explain what the GetList function does in the code?

Also can you tell me if I could take a textbox value as the projectPath in the code?

What is the best way I could solve my problem?

    bool gotList; 
    List<string> files = new List<string>(); 

    using (SvnClient client = new SvnClient()) 
    { 
        Collection<SvnListEventArgs> list; 

        gotList = client.GetList(projectPath, out list); 

        if (gotList) 
        { 
            foreach (SvnListEventArgs item in list) 
            { 
                files.Add(item.Path); 
            } 
        } 
    } 

I also get the "PROPFIND of '/nyts': authorization failed: Could not authenticate to server: rejected Basic challenge (http://olfandsub1.olf.com <http://olfandsub1.olf.com/> )" error even though my username and password are absolutely right.

Please let me know asap as I've been trying to implement this for 3 days now. Thanks.

Chuck Savage
  • 11,775
  • 6
  • 49
  • 69

1 Answers1

0

You should add something like

client.Authentication.DefaultCredentials = new NetworkCredentials("user", "password");

Or more cleaner hook the events on the Authentication class and provide credentials only when needed.

(The SharpSvn.UI assembly contains the default UI you see in AnkhSVN)

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