TF.exe is equivalent to TFPT.exe scorch

I searched for TF.exe command line equivalent to git reset . I found the TFPT scorch , however it is intended for use on the build server (jenkins), and I cannot get the power tools (standard) to work or work (non-standard, copy).

Whether there is a

  • How to install tfpt.exe on the build server (which does not and should not have a visual studio)?
  • A way to emulate this command with the TF.exe command collection?
+8
tfs tfs-power-tools tf
source share
4 answers

If you are open to writing your own scorch functions, you can do it against the TFS Java SDK , which does not require you to install Visual Studio.

The main mechanism underlying scorch is to get a list of items that are in the version of the workspace and a list of items that have pending changes, comparing this to a list of items on disk, deleting any item on the disk that is not on the server (or has pending change).

(You need to combine a set of server elements with a set of pending changes to avoid deleting pending additions. However, if you want this special application for the build server and you never have any pending changes, feel free to skip this step.)

You can get a list of items on the server using Workspace.QueryItems in the workspace.

+1
source share

You do not indicate which version of TFS you are using. However, there is an equivalent: tf reconcile /clean .

According to 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 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] 

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

This is equivalent: tfpt scorch *.* /noprompt /recursive /deletes /diff

An interesting fact is that this command is missing from the current tf.exe documentation .

In addition, as @Jonathan mentions, there is now the tf scorch , which is very tf scorch like tf reconcile . If there are differences, I canโ€™t find the documentation to back it up. It is very possible that this has something to do with working with Local vs. Workspaces. Server, which was added in 2013 to provide true โ€œstand-aloneโ€ development.

+13
source share

I install TFPT automatically in my install build agent script:

 msiexec /qb /i "tfpt.msi" ADDLOCAL=CLI /l*v tfpt-log.log 

And then it's easy to find it with TFSPowerToolDir env var. Update: This requires Visual Studio - I install a subset of it, just vs_teamExplorer.exe and vstf_testagent.exe .

In addition, tf.exe now has the /scorch . He was not in VS2013, but he is there in VS2013 SP4.

+3
source share

I just added the Delete Files task to the end of the build process with ** as parameters. Thus, each assembly must be updated from scratch, without the need to work with TFS utilities, which may be installed incorrectly on the agent ahead of time. This solution turned out to be much easier for me.

+1
source share

All Articles