如何从tfs中提取python中链接到工作项的变更集?

如何从tfs中提取python中链接到工作项的变更集?,python,python-3.x,python-2.7,dictionary,tfs,Python,Python 3.x,Python 2.7,Dictionary,Tfs,我想使用Microsoft TFS python库在python中提取变更集和受变更集影响的类的名称 我已经使用python连接到TFS,并且能够检索所有必需的工作项。我想提取与工作项关联的变更集 我已使用以下代码进行连接 from tfs import TFSAPI user="xxxxxxxxxxxxx" password="xxxxxxxxxxxxxx" from requests_ntlm import HttpNtlmAuth client = TFSAPI("http

我想使用Microsoft TFS python库在python中提取变更集和受变更集影响的类的名称

我已经使用python连接到TFS,并且能够检索所有必需的工作项。我想提取与工作项关联的变更集

我已使用以下代码进行连接

from tfs import TFSAPI  
user="xxxxxxxxxxxxx"  
password="xxxxxxxxxxxxxx"  
from requests_ntlm import HttpNtlmAuth  
client = TFSAPI("https://xyzjds.com", project="abc", user=user,password=password, auth_type=HttpNtlmAuth)    
query = client.run_query('xxxxxxxxxxxxxxx')    
workitems = query.workitems  

现在我有了所有的工作项,但我不知道如何访问工作项的变更集。

变更集存在于type
ArtifactLink
中的属性
关系中,因此您应该迭代工作项并检查
关系是否存在,如果是,则检查类型
ArtifactLink
的关系是否存在,然后在url中获得变更集id:


请分享您尝试过的代码以及您没有成功的地方。@Shaykibaramczyk我已经添加了代码嘿。我找到了变更集,非常感谢。有可能知道更改集中更改的文件吗?@TasheerHussain尝试使用
客户机.get\u changeset(changeset id)
方法。我知道了,我想要更改集中更改的文件的名称。有可能吗?我不知道它是否存在于这个api中,也许你需要调用rest api或另一个用于tfs的python sdk。你知道有什么有用的资源,我可以研究一下吗?