# Feature Request: Support for 'tf history'

**URL:** https://www.finalbuilder.com/forums/t/feature-request-support-for-tf-history/1424
**Category:** Discussion
**Created:** [January 15, 2010, 12:49pm UTC](https://www.finalbuilder.com/forums/t/feature-request-support-for-tf-history/1424 "2010-01-15T12:49:25Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![cpdaniel](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@cpdaniel](https://www.finalbuilder.com/forums/u/cpdaniel)
#### Post date: [January 15, 2010, 12:49pm UTC](https://www.finalbuilder.com/forums/t/feature-request-support-for-tf-history/1424/1 "2010-01-15T12:49:25Z")

</div>

Hi -

A small feature request, if I could:&nbsp; I use the "tf history" command in many of my fb6 projects to extract changeset numbers for specific files/folders.&nbsp; I then use these changeset numbers as version numbers that are burned into application config files, etc.

Currently, the Team Foundation Server support for FB6, while otherwise excellent, does not provide any wrapper for the history command.&nbsp; This was never a problem previously -&nbsp;I just used the "execute program" task to run tf.exe myself.&nbsp; Now, however, I'm trying to run my FB6 project on a machine that's not in the same domain as the TFS server, so I need to supply credentials.&nbsp; The built-in TFS actions have support for custom credentials, but unfortunately, there's no (obvious) way to get a similar effect for tf history.

&nbsp;

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [January 18, 2010, 3:45am UTC](https://www.finalbuilder.com/forums/t/feature-request-support-for-tf-history/1424/2 "2010-01-18T03:45:24Z")

</div>

Hi Carl,   
  
 I’ll add the request to the feature request list for the next version of FinalBuilder. In the meanwhile though, you should be able to keep using the Execute Program action, you just need to supply the /login command line option:

> /login is used to specify the user name and password to authenticate the user with the Team Foundation Server. The usage is /login:username[,password]. If /login:username is supplied but /noprompt is not, the user is prompted for the password. If /login:username,password is specified, Team Foundation Server uses the supplied parameters.

   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![cpdaniel](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@cpdaniel](https://www.finalbuilder.com/forums/u/cpdaniel)
#### Post date: [January 21, 2010, 5:41am UTC](https://www.finalbuilder.com/forums/t/feature-request-support-for-tf-history/1424/3 "2010-01-21T05:41:42Z")

</div>

Oh yes, I forgot about the /login option.&nbsp; That'll help a little bit, but it's not quite a substitute - unless, that is, there's a way to get at the default credentials that are set up for the TFS plug-in from within the normal execute program action.

As I understand it, the default credentials (set through Tools|Options) are stored as user settings, while a use of the /login command line argument would end up being stored in the FB6 project file where I don't want it (since machines that are domain joined don't need it).

I'll give that a go in the meantime though - while it's not perfect, it's a step in the right direction.

&nbsp;

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [January 22, 2010, 1:16am UTC](https://www.finalbuilder.com/forums/t/feature-request-support-for-tf-history/1424/4 "2010-01-22T01:16:37Z")

</div>

Hi Carl,

**EDIT: We're going to add the action to the current version of FinalBuilder, I'll let you know when a build is available.**

\> unless, that is, there's a way to get at the default credentials that are set up for the TFS plug-in from within the normal execute program action   
  
This is possible; Define two new variables, TFSUser & TFSPass and add the following Javascript scripts to the Execute Program action:   
  
BeforeAction:   
  
var tfsOpts = GetOptionsObject("Team Foundation Source Control");   
TFSUser = tfsOpts.Properties.PropertyAsString("DefUsername");   
TFSPass = DecryptString(tfsOpts.Properties.PropertyAsString("DefToken"));   
  
AfterAction:   
TFSUser = "";   
TFSPass = "";   
  
OnStatusMessage:   
if (StatusMessage.MessageText.indexOf("login") \> -1)   
StatusMessage.Lines.Clear();   
  
Then you can specify the login as /login %TFSUser%:%TFSPass%.   
  
Regards,   
Paul.

---

<div class="post-metadata">

### Author: ![cpdaniel](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@cpdaniel](https://www.finalbuilder.com/forums/u/cpdaniel)
#### Post date: [January 22, 2010, 5:05am UTC](https://www.finalbuilder.com/forums/t/feature-request-support-for-tf-history/1424/5 "2010-01-22T05:05:56Z")

</div>

Awesome, thanks!

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [January 26, 2010, 12:00pm UTC](https://www.finalbuilder.com/forums/t/feature-request-support-for-tf-history/1424/6 "2010-01-26T12:00:30Z")

</div>

Hi Carl,   
  
 Here’s the new build of FinalBuilder which includes a TFS History action.   
  
 URL: [https://www.finalbuilder.com/downloads/finalbuilder/630/FB630\_1903.exe](https://www.finalbuilder.com/downloads/finalbuilder/630/FB630_1903.exe)  
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![cpdaniel](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@cpdaniel](https://www.finalbuilder.com/forums/u/cpdaniel)
#### Post date: [January 26, 2010, 1:10am UTC](https://www.finalbuilder.com/forums/t/feature-request-support-for-tf-history/1424/7 "2010-01-26T01:10:11Z")

</div>

You do know that you folks rule, right?

I'll check out the new build later this week &&nbsp;let you know if I have any problems (which I'm not expecting to be the case).

&nbsp;

---

<div class="post-metadata">

### Author: ![cpdaniel](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@cpdaniel](https://www.finalbuilder.com/forums/u/cpdaniel)
#### Post date: [March 2, 2010, 11:20am UTC](https://www.finalbuilder.com/forums/t/feature-request-support-for-tf-history/1424/8 "2010-03-02T11:20:08Z")

</div>

OK, it took me longer than a week, but I finally got back to this project - the new tf history action works great.&nbsp; Thanks so much!

&nbsp;

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [March 3, 2010, 3:59am UTC](https://www.finalbuilder.com/forums/t/feature-request-support-for-tf-history/1424/9 "2010-03-03T03:59:00Z")

</div>

Excellent! Thanks for letting us know

---

<div class="post-metadata">

### Author: ![cpdaniel](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@cpdaniel](https://www.finalbuilder.com/forums/u/cpdaniel)
#### Post date: [March 8, 2010, 10:07am UTC](https://www.finalbuilder.com/forums/t/feature-request-support-for-tf-history/1424/10 "2010-03-08T10:07:04Z")

</div>

Incidentally - The history command seems to work fine with tf 2008, but when I tried with tf 2005 the action reported "Failed!", yet when I typed the exact command line, including the full path to (2005) tf.exe, it worked just fine.

I'm not sure if this is a bug, or a failure in my expectations or my test case.&nbsp; It's fine with me if it only works with 2008, but&nbsp;it caught me by surprise.

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [March 8, 2010, 11:02am UTC](https://www.finalbuilder.com/forums/t/feature-request-support-for-tf-history/1424/11 "2010-03-08T11:02:17Z")

</div>

Hi Carl,   
  
 Did the action report why it failed with TFS 2005?   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![cpdaniel](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@cpdaniel](https://www.finalbuilder.com/forums/u/cpdaniel)
#### Post date: [March 8, 2010, 11:58am UTC](https://www.finalbuilder.com/forums/t/feature-request-support-for-tf-history/1424/12 "2010-03-08T11:58:30Z")

</div>

The details text in the log reads:   
  
 Path to Executable: C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\tf.exe   
 Command line: history /stopafter:1 /noprompt $/path-to-my-file   
 Failed!
