[WIP] Build a utility to interact with TFS.
Review Request #8258 — Created June 24, 2016 and discarded
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.
- Change Summary:
-
Implement diffing functionality, refactor a bit.
- Commit:
-
3c591d738e6faddea160a12ec4ed1b8e989814ac3c7c898cd9827950550f1fce4584b1ec7da916d4
- Diff:
-
Revision 2 (+561)
-
Tool: PEP8 Style Checker Ignored Files: contrib/tools/tf-helper/org/reviewboard/tfHelper/TFSCollection.java contrib/tools/tf-helper/org/reviewboard/tfHelper/CommandDiffShelf.java contrib/tools/tf-helper/org/reviewboard/tfHelper/Application.java contrib/tools/tf-helper/ivy.xml contrib/tools/tf-helper/org/reviewboard/tfHelper/Command.java contrib/tools/tf-helper/org/reviewboard/tfHelper/TFSDiffer.java contrib/tools/tf-helper/build.xml Tool: Pyflakes Ignored Files: contrib/tools/tf-helper/org/reviewboard/tfHelper/TFSCollection.java contrib/tools/tf-helper/org/reviewboard/tfHelper/CommandDiffShelf.java contrib/tools/tf-helper/org/reviewboard/tfHelper/Application.java contrib/tools/tf-helper/ivy.xml contrib/tools/tf-helper/org/reviewboard/tfHelper/Command.java contrib/tools/tf-helper/org/reviewboard/tfHelper/TFSDiffer.java contrib/tools/tf-helper/build.xml
- Commit:
-
3c7c898cd9827950550f1fce4584b1ec7da916d4b67ac362f4d36435072b3ec94c00e541e32c8bb8
- Diff:
-
Revision 3 (+628)
-
Tool: Pyflakes Ignored Files: contrib/tools/tf-helper/org/reviewboard/tfHelper/TFSCollection.java contrib/tools/tf-helper/org/reviewboard/tfHelper/CommandDiffShelf.java contrib/tools/tf-helper/org/reviewboard/tfHelper/Application.java contrib/tools/tf-helper/ivy.xml contrib/tools/tf-helper/org/reviewboard/tfHelper/Command.java contrib/tools/tf-helper/org/reviewboard/tfHelper/TFSDiffer.java contrib/tools/tf-helper/build.xml contrib/tools/tf-helper/ivysettings.xml Tool: PEP8 Style Checker Ignored Files: contrib/tools/tf-helper/org/reviewboard/tfHelper/TFSCollection.java contrib/tools/tf-helper/org/reviewboard/tfHelper/CommandDiffShelf.java contrib/tools/tf-helper/org/reviewboard/tfHelper/Application.java contrib/tools/tf-helper/ivy.xml contrib/tools/tf-helper/org/reviewboard/tfHelper/Command.java contrib/tools/tf-helper/org/reviewboard/tfHelper/TFSDiffer.java contrib/tools/tf-helper/build.xml contrib/tools/tf-helper/ivysettings.xml
- Change Summary:
-
Major progress.
- Summary:
-
[WIP] Build a utility to fetch shelved file data from TFS[WIP] Build a utility to interact with TFS.
- Description:
-
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. This ~ change is the beginnings of a new application that uses the TFS SDK for Java to ~ add the functionality we need. ~ 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. ~ I've written this using a modular command format because I'd eventually like to
~ expand it to handle a lot more of the interaction with the local TFS ~ repository. The tf
command that ships with Team Explorer Everywhere is pretty~ good, but any time we need to run it multiple times, we incur a pretty steep ~ 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. - performance penalty. ~ At the moment, this bundles a couple dependencies that we use, but does not
~ bundle the TFS SDK. My intention was to just link against the jar files shipped ~ I've written this using a modular command format with individual commands for
~ each of the steps we have. These steps are: - with Team Explorer Everywhere, which we currently require to be installed. It's - possible that we might choose to redistribute those and completely remove the - requirement for TEE to be installed, but that's a larger conversation because - it's a big dependency (we'd probably want to make it a separate download at - that point). ~ This is still a work in progress, but I wanted to get something up because it's
~ starting to get big and I'm paranoid about losing it. ~ - 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.
- Commit:
-
b67ac362f4d36435072b3ec94c00e541e32c8bb8bf215e3d8c6cd0a80345c89ca4e98029b98c068f
- Diff:
-
Revision 4 (+976)
-
Tool: PEP8 Style Checker Ignored Files: contrib/tools/tf-helper/org/reviewboard/tfHelper/TFSCollection.java contrib/tools/tf-helper/log4j.properties contrib/tools/tf-helper/org/reviewboard/tfHelper/Application.java contrib/tools/tf-helper/ivy.xml contrib/tools/tf-helper/org/reviewboard/tfHelper/Revision.java contrib/tools/tf-helper/org/reviewboard/tfHelper/Command.java contrib/tools/tf-helper/org/reviewboard/tfHelper/TFSDiffer.java contrib/tools/tf-helper/build.xml contrib/tools/tf-helper/org/reviewboard/tfHelper/CommandGetCollection.java contrib/tools/tf-helper/ivysettings.xml contrib/tools/tf-helper/org/reviewboard/tfHelper/CommandParseRevision.java contrib/tools/tf-helper/org/reviewboard/tfHelper/CommandDiff.java Tool: Pyflakes Ignored Files: contrib/tools/tf-helper/org/reviewboard/tfHelper/TFSCollection.java contrib/tools/tf-helper/log4j.properties contrib/tools/tf-helper/org/reviewboard/tfHelper/Application.java contrib/tools/tf-helper/ivy.xml contrib/tools/tf-helper/org/reviewboard/tfHelper/Revision.java contrib/tools/tf-helper/org/reviewboard/tfHelper/Command.java contrib/tools/tf-helper/org/reviewboard/tfHelper/TFSDiffer.java contrib/tools/tf-helper/build.xml contrib/tools/tf-helper/org/reviewboard/tfHelper/CommandGetCollection.java contrib/tools/tf-helper/ivysettings.xml contrib/tools/tf-helper/org/reviewboard/tfHelper/CommandParseRevision.java contrib/tools/tf-helper/org/reviewboard/tfHelper/CommandDiff.java