Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS get command erroneously returns "All files are up to date."

Tags:

tfs

We are just in the process of migrating our TFS repo to Mercurial as we've had enough of TFS. Unfortunately TFS has thrown us one last curve ball before it lets us go. We've wrote a script that we intend to have "get" each changeset (including timestamp, check-in comment etc) and then add them to the Mercurial repo and check it in.

Unfortunately TFS is acting very strange when we execute the tf get * /version:C111 /overwrite command. It immediately returns "All files are up to date." But this is impossible. The workspace folder is empty! And viewing the details for the 111 changeset quite clearly shows that the changeset contains "stuff" i.e. the repo is certainly not empty.

What could be causing this?

like image 246
nbevans Avatar asked Jan 10 '11 16:01

nbevans


2 Answers

TF will return "All files are up to date" if the itemspec you pass in is not found. If you don't include an absolute path, a relative path is assumed.

For example if you send

tf get myFile.cs /version:1009 /force 

it looks in the current directory for myFile.cs, which doesn't exist, so it returns "All files are up to date." What we really want is

tf get C:\myproject\myFile.cs /version:1009 /force 

Same thing with wildcards, eg

tf get D:\project\* /version:C111 /overwrite 

Check out the itemspec link for more info.

like image 109
Rob Elliott Avatar answered Dec 09 '22 03:12

Rob Elliott


You should try /all instead of /overwrite, this will force it to get all files, not just the ones it remembers getting to this workspace on the previous get.

MSDN Reference for Get

like image 37
Jeff Hall Avatar answered Dec 09 '22 03:12

Jeff Hall