TFS: pending delete+add => file rename

时光总嘲笑我的痴心妄想 提交于 2019-12-11 12:19:49

问题


How do I tell TFS that pending file delete and add is actually a rename ?

For example, I deleted

201505132029594_InitialCreate.cs and tool created

201509141933543_InitialCreate.cs

I'd like to tell TFS that this was a file rename+edit. Ideally, from command line, something like

tf rename /someswitch 201505132029594_InitialCreate.cs 201509141933543_InitialCreate.cs

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)

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/3c909ee5-f6fa-4415-b31c-4822fc30405c/fix-the-outcome-after-you-rename-an-item-in-your-operating-system?forum=tfsversioncontrol


回答1:


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.



来源:https://stackoverflow.com/questions/32592050/tfs-pending-deleteadd-file-rename

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!