Friday, August 31, 2012 3:03 PM
Using Team Explorer Everywhere command line, I would like to get a report of new, changed, and deleted files. The Microsoft Visual Studio 2010 Pending Changes window provides a nice summary of these. Is there a way to get the command line to show the same report content as the Visual Studio Pending Changes window?
I find that if I create a file within a local mapped folder and then run "tf status," the command line tool incorrectly reports "There are no matching pending changes." Similarly, "tf diff" also incorrectly reports "There are no pending changes." My expectation is that the new file should be reported.
Test System: Team Explorer Everywhere (version 10.1.0.201112140701), CentOS release 5.5 (Final)
Monday, September 03, 2012 11:42 AMOwner
When using a server workspace (which is the only option for Team Foundation Server 2010 and Team Explorer Everywhere 2010) changes are not automatically detected by the tf command line. You have to explicitly add files to TFS (tf add) or checkout files before editing them (tf checkout).
Team Foundation Server 2012 and Team Explorer Everywhere 2012 brought a new mode of operation called a Local Workspace. This does away with the requirement for the read-only bit to files locally, the requirement to check files out before editing them. It also has a scanner that will automatically detect if you have added a file and show that to you - however it will expect you to perform a "tf add" to explicitly add the file to your changeset to make sure that this is what you wanted to do. Once the file is version controlled, it will automatically detect files that have been edited etc and show you those.
As well as getting rid of the read-only bit, TFS 2012 Local Workspaces also brings along the ability to automatically detect when you have added the execute bit to a file (chmod u+x) and pend that change for you in version control so that next time the files is downloaded by you are another user it will have the execute bit set. This is very useful on many unix operating systems.
Therefore, I think my recommendation would be to upgrade to a TFS 2012 local workspace with Team Explorer Everywhere 2012. But in the meantime you will need to explicitly add files from the command line.
- Marked As Answer by Martin WoodwardMicrosoft Employee, Owner Monday, September 03, 2012 11:42 AM
Friday, September 07, 2012 2:41 PM
It seems that the tf online command is close to the desired functionality. I defined the following alias to automatically update the workspace, stage any changes, and report the state of the staging area:
$ alias tfs='echo "GET:"; tf get; echo "ONLINE:"; tf online -recursive -diff -deletes -adds; echo "STATUS:"; tf status'
Unfortunately, this still requires that a tf checkout be performed before changing existing files. It also suffers from reporting those checkouts in the staging area even when the content is unchanged.
Is Team Explorer Everywhere 2012 available?
Friday, September 07, 2012 8:10 PMModerator
If you're using the "tf online" route, you need not explicitly run tf checkout. If you mark a file as writable, and edit the file, then "tf online" will discover the changes.
Team Explorer Everywhere 2012 is available for download at http://www.microsoft.com/en-us/download/details.aspx?id=30661. Note that you will also need Team Foundation Server 2012 to take advantage of local workspaces, this is not a client-side only feature and does require an upgraded server.
- Marked As Answer by User 01 Friday, September 07, 2012 9:14 PM