Answered Unshelve shelveset when files locked?

  • Friday, February 23, 2007 1:10 PM
     
     

    I tried to unshelve another users shelveset and one of the files in the shelve was a .exe and it said the file was locked so I could not get the shelveset.

    Is there a way I can get the files out without having it try to checkout (lock), as I need that file for my testing.

     

    Thanks.

All Replies

  • Friday, February 23, 2007 1:56 PM
    Moderator
     
     Answered

    There's a couple different routes, but the easiest is probably to use tf view to download the file, like:

    tf view /shelveset:shelveset;other\user $/whatever/path/foo.exe > foo.exe

  • Friday, February 23, 2007 4:47 PM
     
     

    Thanks that worked. It is kind of weird though.  What if there were a bunch of locked files would I have to do each individually?  Isn't there some way to get all files from a shelveset and put them somewhere?  Seems a bit painful if had to do it this way all the time.

     

    Thanks.

     

     

  • Friday, February 23, 2007 5:06 PM
    Moderator
     
     

    We don't ship anything for that, but you could do it in probably ~20-30 lines of code using our object model.

    In shelveset details, you can right-click on a file an "View", but we actually try to invoke the file in that scenario, so you won't get a "Save" dialog (IIRC) if the extension already has an association (as exe does)

  • Monday, February 26, 2007 1:15 PM
     
     
    Really what needs to be done is add an option to the unshelve dialog, that is checkout files on unshelve.  Allow the user to uncheck that so they don't require being locked so you can always unshelve
  • Monday, February 26, 2007 2:41 PM
     
     

    Overwriting files without checking them out is against philosophy of TFS (tracking all changes on server). How could you check in changes that you've unshelved if the unshelve didn't check out files? You would need also to do get /force every time to clean your workspace. I see two possibilities:

    • simple powertool that "unshelve" changes outside of workspace (the same way James described) (imho hacky and not ideal solution)
    • make possible to check out binary files without locking them
  • Monday, February 26, 2007 3:43 PM
     
     

    Why not consider getting a shelveset like getting a private version.  This way a normal get could overwrite the file without doing a force.  The files would not be writeable if you didn't request checkout.

     

     

  • Monday, February 26, 2007 5:17 PM
     
     

    Unfortunately I don't know what private version is. I don't see value in adding extra state for the file (instead of checkout, we have "private checkout"?). Checking out, without locking even binary files seems to me to be much cleaner, simpler and better solution.

  • Monday, February 26, 2007 6:05 PM
     
     
     Michal Malecki - MSFT wrote:

    Unfortunately I don't know what private version is. I don't see value in adding extra state for the file (instead of checkout, we have "private checkout"?). Checking out, without locking even binary files seems to me to be much cleaner, simpler and better solution.

     

    As long as there is some mechanism to do this from the IDE is fine with me.  I just want to make sure developers can always get someone else's shelveset to code review or test regardless of if they need lock access or not.

    Shelvesets act like a developer backup of code they are not ready to check in, it's important not to shake confidence in this mechanism by having cases a developer can not unshelve. 

     

     

     

  • Thursday, April 19, 2007 8:31 PM
     
     

    We have just released Shelveset Sidekick, which allows one to easily view and save shelved files.

     

    Hope that helps,

    Eugene

  • Tuesday, August 28, 2007 7:09 PM
     
     

    This issue popped up for us today as well.  Developer A is working on a web project and shelves some changes, including gifs and pngs, so that I can help.  I cannot get his shelveset unless I:

     

    1.  Uncheck each image file individually so that I can get the rest of the shelveset.  Then use the Shelveset Sidekick to manually download each image file 1 at a time.

     

    2.  Change TFS source control settings to not lock image files.

     

    We chose option 1 for now for fear of unknown issues if a merge occurs on an image file.

     

    Something to note, in this scenario, it would be nice if TFS assisted us in working together as a team and not made it more difficult to do so.

     

    Thanks,

    Rick

     

  • Thursday, November 29, 2012 12:20 PM
     
     

    I've run into this issue today.

    I don't want to modify the files in the shelveset, I only need to download local and debug a bug.

    There are more than 50 locked files, so downloading each locked file individually is not a good solution. 

    There could be an unshelve option to not check out files, only overwrite. If are not checked out I can't check in so TFS integrity will not be harmed.

    In my environment the primary use of shelvesets is to share code for code reviews and debugging without having to send around a bunch of files in zip archives. 

  • Wednesday, January 23, 2013 3:41 AM
     
     

    I run into this as well.

    I use shelvesets as a place to put my work-in-progress without checking them in (and wreaking havoc on the automated builds) so that I can go home (or onto another workstation), download the shelveset, and pick up where I left off.