Client TFS 2010 Support

Jul 15, 2010 at 3:39 PM

I see a post on how to get the svnbridge server to work but has anyone gotten the client to work?

Sep 1, 2010 at 1:44 AM

No luck here.  I need this as well.  The server version is unworkably slow (probably because it's accessing a repository with over 20GB of source in it).  I'm hoping the client side version is more stable and makes things usable.

Sep 2, 2010 at 6:32 AM

By the way, I have VS2008 TE with forward compatability installed as well as the TFS2010 TE.  It doesn't fix things. :-(

Sep 2, 2010 at 7:57 AM

OK, so I've got this working by doing a few hacks on the code.

First up, I found the user.config file in <my user>\Local Settings\Application Data\Microsoft\SvnBridge\3.0 and added a TfsUrl setting (much like we do with the server version in web.config) pointing to http://mytfs:8080/tfs/collection

In the SvnBridge project I changed the Presenters\ListenerViewPresenter.cs class as follows:

  public void StartListener()
            IPathParser parser;
            if (!string.IsNullOrEmpty(Configuration.TfsUrl))
                parser = new PathParserSingleServerWithProjectInPath(Configuration.TfsUrl);
                parser = new PathParserServerAndProjectInPath(Container.Resolve<TfsUrlValidator>());

And in SvnBridge.Library\SourceControl\TFSSourceControlService.cs I changed the QueryItems class to look like this:

                    if (!badPath)
                        NetworkCredential callCredentials;
                        if (!string.IsNullOrEmpty(Configuration.ReadAllUserName))
                            callCredentials = new NetworkCredential(Configuration.ReadAllUserName, Configuration.ReadAllUserPassword, Configuration.ReadAllUserDomain);
                            callCredentials = CredentialCache.DefaultNetworkCredentials;

                            Repository readAllWebSvc = CreateProxy(tfsUrl,callCredentials);
                            ItemSet[] readAllResult = readAllWebSvc.QueryItems(null, null, items, version, DeletedState.NonDeleted, ItemType.Any, true);
                            if (readAllResult[0].Items.Length == 0)
                                badPath = true;
                        catch (Exception ex)
                            logger.Error("Error connecting with read all account " + Configuration.ReadAllUserName, ex);


Hopefully that helps a few others out, and ends up in the main codeline soon enough (along with proper support for TFS2010 project collection urls).

By the way, the change means that now instead of pointing to http://localhost:8080/mytfsserver/tfs/collection/project/path you now just do http://localhost:8080/project/path.

Sep 13, 2010 at 5:16 PM