I have been looking for the TF.exe command line equivalent to git reset
.
I found TFPT scorch
, however this is for use on a build server (jenkins), and I cannot seem to get the power tools installed (in a standard manner) or working (non standard, copy across).
Is there either
- A way to install tfpt.exe on a build server (that does not, and must not, have visual studio)?
- A way to emulate this command with a collection of TF.exe commands?
If you're open to writing your own "scorch" functionality, you can do so against the TFS Java SDK, which does not require you to install Visual Studio.
The basic mechanism behind scorch is to get a list of items that are in the workspace version and a list of items that have pending changes, comparing that with the list of items on-disk, deleting any item on-disk that is not on the server (or has a pending change).
(You need to union the set of server items with the set of pending changes to avoid deleting pending adds. However, if you want this special cased for a build server and you will never have pending changes, feel free to omit this step.)
You can collect a list of items on the server using
Workspace.QueryItems
at the workspace version.