TFS:待删除+添加=>文件重命名 [英] TFS: pending delete+add => file rename
问题描述
我如何告诉 TFS 挂起的文件删除和添加实际上是重命名?
How do I tell TFS that pending file delete and add is actually a rename ?
比如我删除了
201505132029594_InitialCreate.cs 和工具创建
201505132029594_InitialCreate.cs and tool created
201509141933543_InitialCreate.cs
201509141933543_InitialCreate.cs
我想告诉 TFS,这是一个文件重命名+编辑.理想情况下,从命令行,类似于
I'd like to tell TFS that this was a file rename+edit. Ideally, from command line, something like
tf 重命名/someswitch 201505132029594_InitialCreate.cs 201509141933543_InitialCreate.cs
tf rename /someswitch 201505132029594_InitialCreate.cs 201509141933543_InitialCreate.cs
显然,此功能存在于 UI 中(请参阅修复操作系统重命名的结果"):
Apparently, this functionality exists in the UI (see "To fix the results of an operating system rename"):
https://msdn.microsoft.com/en-us/library/ms181398(v=vs.110).aspx#fix_os_rename
不幸的是我找不到它(显然其他人也找不到)
Unfortunately I can't find it (nor can other people apparently)
推荐答案
您可以使用 TFS API 重命名.在您的情况下,您只需要让 TFS 知道发生了什么,而无需更改磁盘上的任何内容.因此,使用 Workspace.PendRename 方法并指定 <updatedisk
的代码>false.
You can rename using the TFS API. In your case, you only need to let TFS know what happened and do not need to change anything on disk. Thus, use the Workspace.PendRename method and specify false
for updatedisk
.
这篇关于TFS:待删除+添加=>文件重命名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!