简体   繁体   English

检查TFS文件夹中的所有文件是否均为“最新”

[英]Check if all files in TFS folder are “latest”

I´d like to check if all files in an specific tfs folder are "latest". 我想检查特定tfs文件夹中的所有文件是否均为“最新”。 If they are not (see picture) a get-latest will be executed. 如果不是(请参见图片),将执行最新操作。 If they are all "latest" no get-latest will be performed. 如果它们都是“最新”的,则不会执行最新操作。 The reason why I´d like to prevent always executing a get-latest is that it takes much time. 我想阻止总是执行最新操作的原因是,这需要花费很多时间。

在此处输入图片说明

So what I need to know is whether all files are latest. 因此,我需要知道的是所有文件是否都是最新的。 I tried to get this information that way . 我试图以这种方式获得这些信息。 Getting the latest-state worked well, but it took even more time than an get-latest itself. 获取最新状态的效果很好,但是花费的时间比获取最新状态本身还要花费更多时间。

Is there any way to get information about the latest-state of files hostet in tfs, without performing time-consuming operations? 有没有办法在不执行耗时的操作的情况下获取有关tfs中文件hostet最新状态的信息?

If you want to know whether you're up-to-date without downloading files, then you can do a "preview get" : 如果您想知道是否最新而不下载文件,则可以执行“ preview get”

tf get /version:T /preview

This will tell you whether you're up-to-date or not, and if not, what you would need to download to become up-to-date. 这将告诉您是否是最新的,如果不是最新的,您将需要下载什么才能成为最新的。

But this strategy will not provide a benefit for speeding up your updates, it will be (net) slower than if you'd just done a get latest in the first place. 但是,这种策略不会为加快更新速度提供任何好处,它(净)的速度比刚开始获取最新信息的速度要慢。

Get Latest (with preview) will ask the server what's necessary to do a get: the server will compute the differences between your workstation version and the server version and provide you with the list of files that you need to download. 获取最新信息(带预览)将询问服务器进行获取操作的必要条件:服务器将计算您的工作站版本与服务器版本之间的差异,并为您提供需要下载的文件列表。

Now if you were to turn around and do a Get Latest, then that will... ask the server what's necessary to do a get. 现在,如果您要转身并获取最新消息,那将会...询问服务器进行获取消息的必要条件。 It will recompute that list, and give you the list of files that you need to download. 它将重新计算该列表,并为您提供需要下载的文件列表。 Now you'll actually download them and "complete" the Get by telling the server that you've updated your local files. 现在,您实际上将下载它们,并通过告诉服务器您已经更新了本地文件来“完成” Get。

You've added an unnecessary round-trip and server computation to the mix. 您已经在混合中添加了不必要的往返和服务器计算。

Doing a "Get Latest" is the fastest possible route to updating your latest version information, whether you're already up-to-date or not. 不管您是否是最新的,执行“获取最新”都是最快的途径来更新您的最新版本信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM