Udostępnij za pośrednictwem


Handy Tips for tf.exe

Using tf.exe gives you more options and more control, here are some tips that might come handy:

For item specs:

  • You can use wildcards with most of the commands
  • Just like most command-line apps, you can supply relative path parts (like . and ..), you can use \ to designate the root of the drive, and you can use UNC paths
  • You also can use server paths (designated by $/), some times you have too (like in tf destroy)
  • Most of the commands will accept more than one item spec at a time

For version specs:

  • These values can be passed to the /v (/version) option or appended to the item spec to specify a certain version of the item:
  • A changeset number can be used directly or optionally preceded with the prefix C. For example: File.cs;C123
  • Labels are preceded with the prefix L, to use a label that contains spaces use double quotes. For example: File.cs;L"Good Build"
  • Any .Net DateTime format can be used to specify the date-time of a version, and it should be preceded with the prefix D. For example: File.cs;D"2009-04-01"
  • To use the current workspace version, you can use the letter W, or you can use it as a prefix for another workspace’s version. For example: File.cs;WotherWs;DOMAIN\username or File.cs;W
  • For the tip (latest) version, just use the letter T. For example: File.cs;T

Options aliases:

Option Alias
/changeset /g
/comment /c
/computer /m
/delete /d
/force /p
/format /f
/help /? or /h
/lock /k
/login /y
/newname /n
/noprompt /i
/owner /o
/recursive /r
/server /s
/slotmode /x
/template /t
/user /u
/version /v
/workplace /w

Comments