none
How to get notified whenever a user checkout or check In a file inTFS?

    Question

  • Hi,

    I am supposed to write a Window service which will log the deatils of the user  and the file when ever a user CHeck-OUT and Check-IN a particular file(source code) in TFS.

    But as there is no event for check-out ,so Kindly somebody let me know how to complete this task or and LINK for that.

    Thanks in Advance

    Wednesday, May 16, 2007 6:00 AM

Answers

  • Based on this post, there is no Check-Out event supported in TFS.

     

    You may be able to work around the lack of a Check-Out event by implementing SQL Server Query Notifications - although I'm not familiar enough with the TFS databases to know exactly how to implement it.  Also, there's always a good chance that the next release of TFS (i.e. "Orcas") will "break" whatever query notification you create so you may have to recreate it once the new version is released - unless, of course, "Orcas" includes a "Check-Out" event.

     

    Hope this helps.

    Wednesday, May 16, 2007 11:56 AM
  • Possible workaround (if you are willing to go this road), is to create Visual Studio add-in. On client side you may hook up to NewPendingChange event to get info about check out; and as it may be fired multiple times if you check out several files, youmay want to utilize OperationStarted and OperationFinished events. While the approach surely has its downsides (deployment of add-in on every workstation) it gives you a lot of additional power.

     

    Client side events available is a wider (and somewhat different) set than those you can subscribe to on server. Have a look here for the list.

     

    We have used the approach for one of our clients; on check out event our custom web service is accessed from the add-in and mail notification is performed from web service.

     

    Cheers, Eugene

    Thursday, May 17, 2007 4:45 PM

All replies

  • Based on this post, there is no Check-Out event supported in TFS.

     

    You may be able to work around the lack of a Check-Out event by implementing SQL Server Query Notifications - although I'm not familiar enough with the TFS databases to know exactly how to implement it.  Also, there's always a good chance that the next release of TFS (i.e. "Orcas") will "break" whatever query notification you create so you may have to recreate it once the new version is released - unless, of course, "Orcas" includes a "Check-Out" event.

     

    Hope this helps.

    Wednesday, May 16, 2007 11:56 AM
  • Possible workaround (if you are willing to go this road), is to create Visual Studio add-in. On client side you may hook up to NewPendingChange event to get info about check out; and as it may be fired multiple times if you check out several files, youmay want to utilize OperationStarted and OperationFinished events. While the approach surely has its downsides (deployment of add-in on every workstation) it gives you a lot of additional power.

     

    Client side events available is a wider (and somewhat different) set than those you can subscribe to on server. Have a look here for the list.

     

    We have used the approach for one of our clients; on check out event our custom web service is accessed from the add-in and mail notification is performed from web service.

     

    Cheers, Eugene

    Thursday, May 17, 2007 4:45 PM