How does the client work?

Jul 15, 2008 at 10:43 AM
How does the cpc work without creating workspaces on the codeplex servers? Is it using one common workspace for all (wouldnt think so) or is there a tweak in the TFS implementation?
Jul 15, 2008 at 2:45 PM
It only needs to create a workspace for commit operations, and it creates it just before the commit then deletes it immediately after.

The CodePlex TFS servers are stock servers (using a custom project template, of course).
Jul 15, 2008 at 8:02 PM
Oh, I was more wondering how the CPC can retrieve files from a (stock) TFS without creating a workspace or a work folder on the servers for every project on codeplex. Is it possible to mimic the anonymous handling that CPC does with a stock TF command line client?
Jul 16, 2008 at 7:32 PM

TFS has two out-of-the-box APIs: one is the web service API, and one is the .NET wrapper that talks to this web service. These two APIs actually behave significantly differently.

The low level web service API for TFS allows you to do things like getting the content of items without having a workspace. In obvious hindsight (knowing that we've now built tfc/cpc), the low level APIs are flexible enough to allow a very disconnected, client-state oriented view of the world.

The slightly higher level .NET wrapper API doesn't allow this. It bakes in a lot of assumptions about workspaces and their relationship to your local file system that you simply cannot avoid. For this reason, we created our own high level API, one that allowed you access in a more client-state oriented manner.

Unfortunately, the TF command line tool is built on the out-of-the-box .NET wrapper API provided by the TFS team, so getting files without a workspace is impossible. A "tf get" operation is going to require you to have a workspace. If you just want a command-line alternative to tf.exe, then our tfc.exe should suit your needs.

On the second part of your question, the anonymous behavior was built by the CodePlex team, and therefore not available for Team Foundation Server by default. I'm working on a blog post about how we achieved this, and will post it to my blog soon.

Jul 16, 2008 at 8:12 PM
Thanks a lot for the thorough explaination, now I understand how the cpc goes around the workspace "feature" for the TF command line tool. Making it possible to retrieve the files without affecting anything on the server is a very nice feature of the CPC tool. The CPC tool makes it easier to help out on projects without applying for a project membership.

I am missing one crucial feature in the CPC, and that is the "history" command. Is there a reason why it was left out, or is it in the road map?

Waiting eagerly for your blog post about the anonymous feature.
Jul 16, 2008 at 9:54 PM
Edited Jul 16, 2008 at 9:54 PM
I was the last developer to work on the CodePlex Client, and I left CodePlex almost a year ago (shortly after CodePlex Client went v1.0).

Nobody has been actively maintaining it since then. The core API library has been updated infrequently as needed for SvnBridge. The team's source control focus has been on SvnBridge since CodePlex Client v1 shipped. I've updated the wiki home page (at your suggestion) pointing out that people should probably not be expecting further releases.

As for history, the log command might suit, though it is very limited: it only works for a single file (not folder) that exists on your local file system. It cannot make arbitrary requests and does not support folders nor recursion. This was obviously something we had planned to enhance later with fuller functionality, but never got around to for v1.

Here is an example of output from the project:

C:\Dev\xunit\Main> cpc log xunit.tests.msbuild
Log for $/xunit/Main/xunit.tests.msbuild
r20722 | SND\BradWilson_cp | 6/29/2008 6:28 PM

Moved xunitext.nunit from Main to Samples
r17004 | SND\BradWilson_cp | 4/23/2008 7:00 PM

Fix for issue #4335 (for xunitext.runner.msbuild.dll)
r17003 | SND\BradWilson_cp | 4/23/2008 6:40 PM

Fix for issue #4335 (for xunit.console.exe)
r16515 | SND\BradWilson_cp | 4/9/2008 7:47 PM

Added several tests around ExecutorWrapper in advance of some new methods
(RunTests and EnumerateTests, which are not implemented yet). Fixed a bug
where ExecutorWrapper's constructor could throw and therefore not clean up
the AppDomain it had created.
r16382 | SND\BradWilson_cp | 4/5/2008 6:22 PM

Converted MSBUILD file to generate xUnit XML files in preparation for CCnet support
r15895 | SND\BradWilson_cp | 3/15/2008 5:40 PM

Merged xunit and xunitext source code into this tree