TFS 命令行帮助
我正在尝试从 TFS 中获取一些信息。 具体来说,对于给定的用户,我希望获得所有变更集及其日期和所有更改项目的列表(内联差异的奖励点)。 此列表将用于对所有修改的文件运行差异。
大致如下:
tf history /user:USERNAME
// pump changeset number into
tf changeset 'changeset number'
// now get the items, and pump into
tf diff 'item' /version:C122~C123
我相信我可以为此使用 TFS 报告,但我没有报告服务器的访问权限:(
我可以使用一些正则表达式在 C# 中运行它,但我宁愿避免这样做。
谢谢:)
I am trying to get some information out of TFS. Specifically, for a given user, I would like to get a listing of all changesets with their date and all changed items (bonus points for inline diff). This listing will be used to run a diff for all modified files.
Something along the lines of:
tf history /user:USERNAME
// pump changeset number into
tf changeset 'changeset number'
// now get the items, and pump into
tf diff 'item' /version:C122~C123
I believe I could use TFS Reporting for this, but I do not have access permission to the reporting server :(
I could run this in C# with some regex, but I'll rather avoid that.
Thanks :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
for /f "tokens=1" %f in ('tf History /user:username . /recursive /noprompt') do for /f "tokens=2" %g in ('tf Changeset %f') do tf diff / noprompt /version:C%f %g
您可能想要将其分解以从 tf 历史记录和 & 中删除垃圾。 tf 变更集
例如: | 查找str /R [0-9]。 从 tf 历史记录中仅获取变更集编号
for /f "tokens=1" %f in ('tf history /user:username . /recursive /noprompt') do for /f "tokens=2" %g in ('tf changeset %f') do tf diff /noprompt /version:C%f %g
You may want to break it up to cut the rubbish from tf history and & tf changeset out
such as : | findstr /R [0-9]. to get only the changeset number from tf history