Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TF.exe equivalent to TFPT.exe scorch

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

  1. A way to install tfpt.exe on a build server (that does not, and must not, have visual studio)?
  2. A way to emulate this command with a collection of TF.exe commands?
like image 446
major-mann Avatar asked Dec 05 '13 16:12

major-mann


People also ask

What is TF exe?

You can use version control commands to do nearly all tasks you can do in Visual Studio, and also several tasks that can't be done in Visual Studio. You can use the tf.exe tool to run version control commands from a command prompt or within a script.

How do I open the TF command line?

To do so, login to TFS as the administrator user. From the 'Start' button, select 'All programs' > MS VS 2010 > Visual Studio tools > Visual Studio > Command prompt. You can test a couple of tf.exe commands on this command prompt. Get a list of tf commands by just typing tf /? on the command prompt.

What is TF command in Linux?

TinyFugue (also known as "Fugue" or "TF") is a line-based client designed for connecting to MUD servers (note: LP, DIKU, and other servers which use prompts require "/lp on"; see /help prompts). Most of the TF documentation is in the help file, which may be read online with the "/help" command.


2 Answers

You don't specify which version of TFS you are using. However, there is an equivalent: tf reconcile /clean.

As per the tf documentation:

Microsoft (R) TF - Team Foundation Version Control Tool, Version 12.0.30501.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Compares the current state of the workspace on disk with the server's view,
either to clean the workspace or to promote unpended local changes.

tf reconcile /clean [/diff] [/noprompt] [/preview] [/recursive] [/ignore]
             [/unmapped] [/exclude:itemspec1,itemspec2,...] [itemspec]

tf reconcile /promote [/adds] [/deletes] [/diff] [/noprompt] [/preview]
             [/recursive] [/noignore] [/exclude:itemspec1,itemspec2,...]
             [itemspec]

Running: tf reconcile /clean /diff /noprompt /recursive *.*

Is equivalent to: tfpt scorch *.* /noprompt /recursive /deletes /diff

Interesting fact is that this command is absent from current tf.exe documentation.

Also, as @Jonathan mentions, there is now a tf scorch command as well which is eerily similar to tf reconcile. If there are differences, I cannot find the documentation to back it up. It's very possible it has something to do with working with Local vs. Server workspaces, which was added in 2013 to allow true "offline" development.

like image 185
Sumo Avatar answered Oct 30 '22 08:10

Sumo


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.

like image 25
Edward Thomson Avatar answered Oct 30 '22 08:10

Edward Thomson