Build a utility to interact with TFS.
Review Request #8333 — Created Aug. 17, 2016 and discarded — Latest diff uploaded
The "tf" command that ships with Team Explorer Everywhere is pretty good, but it is missing some functionality that we'd like. Most notably, there's no way to get the content of files within a shelveset without unshelving it. That means that in order to be able to post shelvesets, we need our own adapter. This change is the beginnings of such an adapter, using the TFS SDK for Java. Because we have such an adapter now, we can make it do exactly what we need for interacting with TFS, which dramatically reduces the number of times it needs to be called. This is good because each time it is called, we have to spin up the whole JRE. I've written this using a modular command format with individual commands for each of the steps we have. These steps are: - Verify the workspace and get the URL of the collection. - Parse a given revision spec (with zero, one, or two "revisions" specified). This converts those revisions into either numeric changesets or special internal keys representing either the working copy or a shelveset. - Do a diff based on the parsed revisions. Diffs are currently implemented for the working directory and shelvesets. I haven't yet implemented diffs for committed revisions, because that's somewhat more complex, but the existing tf.cmd-based implementation doesn't do it either. This does not yet handle rbtools' -I and -X flags. Testing done: Used this to post pending and shelved changes. Reviewed at https://reviews.reviewboard.org/r/8303/