提出问题提出问题
 

已答复How to UndoCheckout for specific user

  • 2009年10月22日 0:19gfilkov 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    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.

    Please help.
    Thanks

答案

  • 2009年10月28日 16:45gfilkov 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     已答复
    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

全部回复

  • 2009年10月27日 12:21Chao KuoMSFT, 版主用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    Hello, 
    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
  • 2009年10月28日 16:45gfilkov 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     已答复
    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