TFS 2010 和未修改文件的签入 [英] TFS 2010 and the check-in of non-modified files

查看:24
本文介绍了TFS 2010 和未修改文件的签入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以仅签入包含 Team Foundation Server 修改的文件?我的意思是有没有可以在某处激活它的选项?

Is it possible to check-in only files that contain modification with Team Foundation Server? I mean is there an option to activate this somewhere?

当外包公司向我们发送近一百个源代码文件并且我只想签入修改后的文件时,我需要它.

I need it when an outsourcing company send us almost an hundred source code files and I want to check in only the modified ones.

推荐答案

当您执行签入时,Team Foundation Server 不会接受变更集中未修改的项目,但变更集中的其余部分将成功.如果所有 文件都未修改,您将收到一个错误并且您的变更集将不会被提交.因此,如果您只是担心会因实际上并未更改内容的更改而弄乱您的历史记录,那么 TFS 会为您解决这个问题.

When you perform a check in, Team Foundation Server will not accept items in your changeset that are unmodified, however the rest of the changeset will succeed. If all files are unmodified, you'll get an error and your changeset will not be committed. So if you're just worried about cluttering your history with changes that didn't actually change the content, then TFS will take care of this for you.

但是,有许多实际上没有编辑的待处理更改可能会令人讨厌.如果您只想查看为代码审查或一般理智目的而实际修改的内容,TFS Power Tools 包含 tfpt 命令,该命令具有撤消未更改"功能,可以撤消对未修改文件的检出.

However, it can be obnoxious to have a lot of pending changes that don't actually have edits. If what you want to do is only see what's actually modified for code review or just general sanity purposes, the TFS Power Tools contain the tfpt command, which has an "Undo Unchanged" feature that will undo the check outs on unmodified files.

撤销不变命令有如下用法:

The undo unchanged command has the following usage:

tfpt uu - Undo unchanged

Undoes redundant pending changes. If the state of an item with a pending
change is the same as on the server, then the change is undone.

Usage: tfpt uu [/changeset:changesetnum] [/recursive] [/noget] [filespec...]

 /changeset             Compare the workspace to item states at the changeset
                        version specified instead of the latest version
 filespec...            Only check the listed filespecs for redundant changes
 /recursive             Check the specified filespecs with full recursion
 /noget                 Do not run get before checking

The /changeset option may not be used with filespecs or /recursive.

例如,以下命令将对 TeamProject 执行递归获取,提供具有冗余更改的文件列表,然后提示用户是否要撤消它们:

For example, the following command will do a recursive get on TeamProject, provide a list of files with redundant changes and then prompt the user if they want to undo them:

tfpt uu C:\TFS\TeamProject /recursive

这篇关于TFS 2010 和未修改文件的签入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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