I have some version of code on my machine. I want to set up a second machine with the same version of code so I can pull down a shelveset based off this version. However, I didn't write down the day/time I last did get latest on my machine.
To get the right version, I need to know when exactly I last did 'get latest' on my machine. I'm sure there must be some way to do this, maybe on the command line. Does anyone know?
Run this from inside the workspace in question:
tf history $/ -r -version:W -stopafter:1
This will tell you the highest changeset # that has been downloaded to your workspace. So long as your most recent Get operation was a full "Get Latest" (no path scope, no complex versionspec), that's all the info you need. Simply run tf get -version:1234 (replacing the version # with the changeset number TFS provides) in the new workspace to bring them in sync. Of course, you need to ensure the workspace mappings are comparable, etc...
If the assumption above don't hold and your workspace is in a more complicated state, the easiest way to replicate it is with labels:
# run in old workspace
tf label MyWorkspaceVersion $/ -r -version:W
# run in new workspace
tf get -version:LMyWorkspaceVersion
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With