我需要查看我的同事(用户名= aahan
)上次检查过哪些文件。表示在历史记录中最后一次检入用户名为aahan
的所有文件。
答案 0 :(得分:0)
SourceSafe API(用于VSS2005的Microsoft.VisualStudio.SourceSafe.Interop或VSS6的SSAPI.DLL中的SourceSafeTypeLib)公开了许多methods and properties,您可以使用这些item history来枚举VS项目以检查每个项目并读取项目历史。然后,您可以检查添加"momentjs"的用户。
以下是一些示例VB.NET代码,它将枚举项目中项目的版本。
Sub CheckVSS
Dim project As VSSItem
Dim vssDB As VSSDatabase
vssDB = New VSSDatabase
vssDB.Open(sourceSafeIniPath, vssUsername, vssPassword)
project = _vssDB.VSSItem(vssProjectFolder)
GetHistory(project)
End Sub
Sub GetHistory(ByVal item As VSSItem)
'--Enumerate through each version of this item.
For Each ver As VSSVersion In item.Versions
Debug.Print("{0}, {1}, {2}, {3}", item.Name, item.Spec, ver.Username, ver.Comment)
Next
'--Recursively enumerate through each item in this folder and child folders.
For Each subitem As VSSItem In item.Items
For Each ver As VSSVersion In subitem.Versions
Debug.Print("{0}, {1}, {2}, {3}", subitem.Name, subitem.Spec, ver.Username, ver.Comment)
Next
GetHistory(subitem)
Next
End Sub