最后一个本地或当前变更集 ID [英] last local or current changeset id

查看:34
本文介绍了最后一个本地或当前变更集 ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题与 TFS 中可用的最后一个更改集 ID 有关,我的查询是,我们的 tfs 集合有多个分支.我为每个分支创建一个工作空间并构建它们.

This question is related to the last change set id available in TFS, my query is, our tfs collection has multiple branches. I create a work space for each branch and build them.

现在我的问题是:我想知道我用来构建解决方案的工作区的最后一个本地变更集 ID.

Now my question is: I wanted to know the last local changeset id of the workspace with which I build the solution.

例如,我在 2 天前构建了 MAIN 分支,现在我想知道本地可用的最后一个本地更改集 ID.我使用了 History 命令 但它是如何给服务器变更集而不是本地变更集 ID 的.

For example, I build MAIN branch 2 days back, now I wanted to know the last local change set id that is available locally. I used History command but some how it is giving the server changeset not the local changeset id.

这是我的论点

tf history  $/MAIN /collection:tfscollection /format:Detailed /sort:Descending /stopafter:1" ;

推荐答案

在这种情况下,您想查看工作区版本的历史记录.TFS 跟踪(服务器端)您在本地拥有的文件版本,并将您的工作区版本定义为您在本地拥有的文件版本.与最新版本对比,后者是服务器上的当前版本.

In this case, you want to look at the history of your workspace version. TFS tracks (server-side) the versions of files you have locally and defines your workspace version to be the version of the files that you have locally. Contrast that with the latest version which is the current version on the server.

您可以使用版本spec 表示您要查询的版本,T 表示最新版本,W 表示您的工作区版本.

You can use a version spec to indicate what version you want to query, T for the latest version and W for your workspace version.

然而,另一个问题是,您当前的查询只会查看您指定的文件夹的历史记录 - 即添加或分支的时间.您将需要执行一个递归查询来举例说明影响(位于)指定文件夹下的所有变更集.

Another problem, however, is that your current query will only look at the history for the folder you're specifying - that is, when it was added or branched. You will need to perform a recursive query to example all changesets that affect (are beneath) the specified folder.

因此,您在服务器上获取最新版本的查询变为:

Thus, your query to get the latest version on the server becomes:

tf history $/MAIN /collection:tfscollection /version:T /recursive /stopafter:1 /format:detailed /noprompt

并获取您的工作区版本:

And to get your workspace version:

tf history $/MAIN /collection:tfscollection /version:W /recursive /stopafter:1 /format:detailed /noprompt

这篇关于最后一个本地或当前变更集 ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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