The VSS helper tool I am developing includes (well, as a menu option so far) the feature to mass-undo checkouts of a specific user. Visual SourceSafe Explorer allows to do that, but in a very boring item-by-item manner.
I can call IVSSItem->UndoCheckout(), and it will work, but just for MY checkouts. The tool impersonates the Admin user and should be able to undo checkouts of any user.
IVSSItem->UndoCheckout() does not provide for passing the user as parameter. IVSSCheckout has BSTR Username() property, but there is no way to obtain IVSSItem from IVSSCheckout instance.
Thanks Chao. That is what I am doing in my code. In a clumsy way though - I have to reset the user's password first. >In my opinion the check out action should be done by the user, not the tool, it is not reasonable. I don't think so. Please note in my post "Visual SourceSafe Explorer allows to do that...", so MS finds it reasonable ;) The operation is mostly applied for the checkouts of the user who has already left the company. Best regards, GF
I think the only way is to log using the specific user's user name and password, by passing the parameter to IVSSDatabase.Open. But this will make the file be checked out in the your help tool side.
In my opinion the check out action should be done by the user, not the tool, it is not reasonable.
Thanks Chao. That is what I am doing in my code. In a clumsy way though - I have to reset the user's password first. >In my opinion the check out action should be done by the user, not the tool, it is not reasonable. I don't think so. Please note in my post "Visual SourceSafe Explorer allows to do that...", so MS finds it reasonable ;) The operation is mostly applied for the checkouts of the user who has already left the company. Best regards, GF