locked
check-in someone else code ? RRS feed

  • Question

  •  

    Hi,

     

    As an admin, how can I check-in code that is check-out by someone else ? There has to be a way to do this otherwise what would we do if a programmer die, quit, ...

     

    Thanks,

     

    Sylvain.

    Monday, September 17, 2007 7:39 PM

Answers

  • There is no one magic command to check-in on behalf of another user, as a given workspace cannot be shared by multiple users.

     

    Typically we recommend users to shelve the work in progress on an ongoing basis. This way another user can unshelve the changes and check-in on behalf of the other user.

     

    But if the changes are not shelved then you can use tf workspace  (http://msdn2.microsoft.com/en-us/library/y901w7se(VS.80).aspx) to view the workspace information of the other user (things like where did they map the workspace on thier local client) and then use tf status (http://msdn2.microsoft.com/en-us/library/9s5ae285(VS.80).aspx) to look at the files they checked-out. Based on this information you can checkout these files on your local workspace, copy the files from the other users machine and apply those changes on your machine and then check-in

    Tuesday, September 18, 2007 5:28 AM

All replies

  • There is no one magic command to check-in on behalf of another user, as a given workspace cannot be shared by multiple users.

     

    Typically we recommend users to shelve the work in progress on an ongoing basis. This way another user can unshelve the changes and check-in on behalf of the other user.

     

    But if the changes are not shelved then you can use tf workspace  (http://msdn2.microsoft.com/en-us/library/y901w7se(VS.80).aspx) to view the workspace information of the other user (things like where did they map the workspace on thier local client) and then use tf status (http://msdn2.microsoft.com/en-us/library/9s5ae285(VS.80).aspx) to look at the files they checked-out. Based on this information you can checkout these files on your local workspace, copy the files from the other users machine and apply those changes on your machine and then check-in

    Tuesday, September 18, 2007 5:28 AM
  • Here is a blog post related to this topic

    http://blogs.msdn.com/buckh/archive/2006/03/20/checkin.aspx

     

    Tuesday, September 18, 2007 5:32 AM
  • I'd suggest your best course of action is to have IT reset their login password and assess the state of the code before checking it in, shelving it or discarding it.

     

    I've found it particularly useful in all cases of death, sickness, redundancy and even holiday, although issuing a warning in the case of holiday can be a useful detterent for people going away with checked out code.

     

    Neil

    Wednesday, September 19, 2007 9:40 AM
  • Neilban, you are right this would be the "simpliest" way to go. But it is not what a call a good procedure.

     

    Unfortunatly, this is another proof that team system is not yet a good source control product.

     

    Anyway, I have undo the change and someone will have the job of putting them back.

     

     

    Wednesday, September 19, 2007 2:08 PM