Possible to get warnings message popup when doing shared checkout in source control?  
Author Message
Milzit





PostPosted: Team Foundation Server - Version Control, Possible to get warnings message popup when doing shared checkout in source control? Top

Is it possible to get the same popup warning message as in Source Safe when a user is performing a shared checkout ("File checked out by another user, are you sure...")If you don't pay attention to the output window from source control you can miss that you are performing a shared checkout.

Visual Studio Team System19  
 
 
Michal Malecki





PostPosted: Team Foundation Server - Version Control, Possible to get warnings message popup when doing shared checkout in source control? Top

Hello,

I'm afraid that there is no easy way to do this. You can disable shared checkouts for the team project (which of course is much more heavy weight solution), you can also use Ed's macro, that does get latest on checkout - http://blogs.msdn.com/edhintz/archive/2005/10/11/479624.aspx

Hope this helps



 
 
eugene.z





PostPosted: Team Foundation Server - Version Control, Possible to get warnings message popup when doing shared checkout in source control? Top

G'day,

I have heard the request from many people as well. The solution we have proposed to our customer is to implement add-in that hooks up on check out event, and checks whether the file is already checked out by someone and displays warning message in that case.

Aside from informational message, I do not think it is possible to allow or disallow the check out (for the lack of "before checkout" event).

Hope that helps.



 
 
Milzit





PostPosted: Team Foundation Server - Version Control, Possible to get warnings message popup when doing shared checkout in source control? Top

Hello

Thank you for the response.

That will help a lot, do you an example of add-in that display this warning message


 
 
eugene.z





PostPosted: Team Foundation Server - Version Control, Possible to get warnings message popup when doing shared checkout in source control? Top

G'day,

I am sorry to say, it is currently in the works. I hope we shall be able to release it into public domain once it is ready.

Yours truly,

Eugene



 
 
CostasZ





PostPosted: Team Foundation Server - Version Control, Possible to get warnings message popup when doing shared checkout in source control? Top

Sorry, to bring this old thread back but, is there any progress on this What I basically need is an event I can trap when VS does a checkout through whatever source control provider it's set up to use.

Thanks


 
 
WXS123





PostPosted: Team Foundation Server - Version Control, Possible to get warnings message popup when doing shared checkout in source control? Top

G'day,

I have heard the request from many people as well. The solution we have proposed to our customer is to implement add-in that hooks up on check out event, and checks whether the file is already checked out by someone and displays warning message in that case.

Aside from informational message, I do not think it is possible to allow or disallow the check out (for the lack of "before checkout" event).

Hope that helps.

I would like to see something on the checkout dialog itself that indicates if someone else has a lock AND/OR if the file you are checking out is not the latest version (as presuming you were in a position to do so you may decide to get latest to avoid a merge later-- often devs think they have the latest code but did not look in SCE, and are surprised later when they have to merge. Where just an early heads up indication would have prompted them to sync their projects, avoid the merge and thus save time.


 
 
CostasZ





PostPosted: Team Foundation Server - Version Control, Possible to get warnings message popup when doing shared checkout in source control? Top

I put this together a few minutes ago. It's a hack but it should help a lot of people out there. Please MSFT make this behaviour configurable or at least provide hooks for people to customize it.

Add this as as Macro in the OutputWindowEvents.

Private Sub OutputWindowEvents_PaneUpdated(ByVal pPane As EnvDTE.OutputWindowPane) Handles OutputWindowEvents.PaneUpdated

If pPane.TextDocument.MarkText("newer version exists in source control", 0) = True Then

MsgBox("Newer version exists in source control", MsgBoxStyle.Exclamation, "VS2005 & TFS WARNING")

pPane.TextDocument.ReplacePattern("newer version exists in source control", "Our Macro replaced the warning", 0, Nothing)

End If

End Sub

later

Costas