使用 TFS TF History 确定最新的变更集 [英] Using TFS TF History to determine the latest changeset

查看:44
本文介绍了使用 TFS TF History 确定最新的变更集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个脚本,该脚本仅在源代码发生更改时才运行构建.我需要知道自上次构建以来是否有变化.这曾经有效,因为文件夹不会被删除,所以很容易确定是否有更改,但现在每次构建运行时都会删除所有内容.我想过使用 TFS TF 历史命令来查询最后一个变更集或最后两个变更集,但是在解析输出中的变更集编号时遇到了问题.我还考虑使用 changeset 命令.是否有任何命令行参数可以用来回答这个问题,自日期或变更集编号以来是否发生了变化?

I'm writing a script that will run a build only if there is a change in source code. I need to know whether there is a change since the build last ran. This used to work because the folder would not be deleted, so it was easy to determine whether there was a change, but now everything is deleted everytime the build is run. I thought about using the TFS TF history command to query the last changeset or the last two changesets, but have had issues parsing just the changeset number from the output. I also considered using the changeset command. Is there any command-line parameter that I can use to answer the question, has there been a change since either a date, or a changeset number?

推荐答案

没有本地工作空间的最新变更集编号,请使用此命令:

To the latest changeset number without local workspace, please use this command:

tf history /collection:"http://server:8080/tfs/Collection" "$/Project" /recursive /stopafter:1 /noprompt /login:domain\user,password

这篇关于使用 TFS TF History 确定最新的变更集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆