none
Unable to checkout a specific version from TFS 2010

    Question

  • Hi,

    I have been working with many versions of TFS and see a similar problem in all of them. I am unable to check out a specific version. Whenever I get specific version and checkout, the latest version is checked out. What is expected is that the same specific version is checked out and during checkin the toll should through a conflict.

    I have always used the brute force method to get back to a specific version. Specifically, get a specific version->copy the file into a temporary folder from my local workspace -> checkout the latest version->overwrite the file with my copy and check in.

    Is there a better way to get back to a specific version.


    Thanks Tuhin "Please mark my replies as answer if they help"
    Thursday, May 19, 2011 4:18 AM

Answers

  • Hi Tuhin - 

    Check-out an old version should be possible.

    Try following this and let us know

    1. Setting that you would want to check - tools --> options --> source control --> VS TFS --> "get latest version of item on check out" - ensure this is unchecked. 

    2. get specific. while getting an old version, put a tick on those 2 check boxes (overwrite...)

    3. do a check-out

    4. look at the properties of that file, "latest version" and "workspace version" must be different

    Hope this helps.

    Thanks!


    --SS | Microsoft Certified Technology Specialist (TFS 2010)
    • Marked as answer by TuhinKanti Friday, May 20, 2011 4:35 AM
    Thursday, May 19, 2011 3:21 PM

All replies

  • You can only check out the latest version. Personally, I can't see how it makes logical sense for a source control system to allow checkout of a previous version.

    You don't have to copy the file to a temporary folder, however. When you do a checkout in TFS, the default behavior is to not do a "Get Latest". Unless you have changed this, you should be able to get the specific version, checkout the current and then checkin. You could also checkout, get previous version and then checkin. There isn't a need to copy to a temp folder.


    DevBiker
    aka J Sawyer
    www.devbiker.net
    Thursday, May 19, 2011 11:33 AM
  • Hi Tuhin - 

    Check-out an old version should be possible.

    Try following this and let us know

    1. Setting that you would want to check - tools --> options --> source control --> VS TFS --> "get latest version of item on check out" - ensure this is unchecked. 

    2. get specific. while getting an old version, put a tick on those 2 check boxes (overwrite...)

    3. do a check-out

    4. look at the properties of that file, "latest version" and "workspace version" must be different

    Hope this helps.

    Thanks!


    --SS | Microsoft Certified Technology Specialist (TFS 2010)
    • Marked as answer by TuhinKanti Friday, May 20, 2011 4:35 AM
    Thursday, May 19, 2011 3:21 PM
  • "You can only check out the latest version. Personally, I can't see how it makes logical sense for a source control system to allow checkout of a previous version."

     

     

    Hmmm, Well J here's a situation I come accross often, the 'Latest Version' works fine.  Client wants a change, the change is made and the client is happy  - for awhile - then they want to back out that change and use the old version - which by now might be several changesets old.  Solution?

     

    Get the old version by changeset number and the sytem is now 'restored' to where the client wants it.

    If all you can do is 'Get latest' then you have to work your way back through all the changes till you reconstruct the version you want. 

    Works good for those times when a 'temporary' change is required but not wanted on a permanent basis also.

     

    Tuesday, June 07, 2011 7:35 PM
  • I didn't say that all you could do was "Get Latest", I said "Check out Latest". They are very different operations.
    To do what you are referring to here, you do not need to check out a previous version. Here's what you do:

    1. Check out the current (local) version.
    2. Get a specific version (by changeset, date, label, whatever ...) and overwrite your local file.
    3. Check in the old (now current) version.

    None of this entails checking out the old version. Look in the "Check Out" dialog ... do you see, anywhere, the option to check out a previous version? You could also reverse steps 1 & 2 as long as you don't force download of the current version on checkout. That's not the default behavior so unless you've changed it, the reversal won't make any difference. However, if that option has been changed, then you'd need to follow the steps in the order above.


    DevBiker (aka J Sawyer)
    My Blog

    If I answered your question, please mark as answer.
    If my post was helpful, please mark as helpful.
    Tuesday, June 07, 2011 10:05 PM
  • How about checking out the project file. And it has substantial amount of changes related to other references in the solution. And you don't want to delve into all of them, just need your local build working properly. So you want that project file being the same version you got.

    You might as well copy the content and paste after checkout latest but..

    So having this checkout specific might be usefull after all. My humble opinion.

    Monday, December 17, 2012 3:31 PM
  • It appears that there may be a bug where the setting is ignored until you modify them. You must first enable both of the "Get latest version of item on check out" options in the Tools and Projects menus, then you must go back and disable them. Enabling and then disabling should restore the correct/expected functionality.
    Friday, August 30, 2013 3:02 PM