TFS 2010如何限制变更集的数量

发布于 2025-01-02 02:36:36 字数 93 浏览 3 评论 0原文

是否可以限制仅保留最后 N 个版本的变更集数量?为了避免数据库无限增长,设置“仅保留最后一个 X 版本并丢弃旧版本”可能会很有用(我有一些项目,2 年前的变更集完全无用!)

Is it possible to limit the number of changesets keeping only the last Nth versions ? To avoid infinite growth of the database it could be useful to set "keep only the last X version and discard the older" (I have some projects that the changesets of 2 years ago are completely useless!)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

吖咩 2025-01-09 02:36:36

我不会推荐这种方法,你永远不知道旧版本的文件何时会有用。代码的寿命比你想象的要长得多,我维护着许多系统,其中仍然维护着十多年前的代码。

TFS 在存储代码(增量和压缩的混合)方面非常高效,有关详细信息,请阅读 Bill Heys 关于该主题的博客

I wouldn't recommend that approach, you never know when having the old version of a file is going to be useful. Code lives for a lot longer than you think and I look after numerous systems where code from over a decade ago is still maintained.

TFS is pretty efficient at storing code (a mixture of deltas and compression) for more information read Bill Heys's blog on the subject.

玻璃人 2025-01-09 02:36:36

您可以将 tf destroy/stopat:X 结合使用,其中 X 代表它将停止删除的变更集 ID。
TF Destroy 的参考位于此处
< br>确保您知道自己在做什么,最好进行测试:tf destroy 是一张单向票,任何操作都无法撤消。

You can use tf destroy with /stopat:X, where X represends the changeset ID it 'll stop deleting.
The ref to TF Destroy is here.

Ensure you know what you 're doing, preferably with tests: tf destroy is a one-way ticket, any action can't be undone.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文