TFS:按旧名称查找移动的文件 [英] TFS: Find a moved file by the old name

查看:22
本文介绍了TFS:按旧名称查找移动的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您只知道文件的旧名称,有没有办法获取文件的版本历史?

is there a way to get the version-history of a file if you only know an old name of the file?

我目前正在查看我们存储库的旧副本(我不知道确切日期,副本已被复制).当我将它与当前存储库进行比较时,有一个文件只存在于副本中,而不存在于当前存储库中.它尚未在存储库中删除.我想,它已被移动或重命名.TFS 中是否有任何方法可以使用旧路径和名称查找版本历史记录?

I am currently looking at an old copy of our repository (I don't know the exact date, the copy was taken). When I compare it to the current repository, there is one file, that only exists in the copy, but not in the current repository. It has not been deleted in the repository. I guess, it has been moved or renamed. Is there any way in TFS to find the version-history using the old path and name?

我知道我可以使用名称或一些代码片段进行挖掘.但是 IMO 在使用存储库时这不是可接受的解决方案 :)

I know that I could dig around using the name or some code-fragments. But IMO this is not an acceptable solution when using a repository :)

非常感谢

安德烈亚斯

推荐答案

在 Team Explorer 2010 中,您只需打开显示已删除的文件"选项并导航到原始文件夹,您就可以看到被移动或删除的文件.您可以查看该项目的历史记录以查看其最后一个变更集 - 这将显示它是否被彻底删除,或者它是否刚刚重命名,因此该项目不再存在于当前路径名(又名插槽")中并被删除那样.您可以进一步深入查看该变更集的变更集详细信息,以查看该项目占用的新路径名(槽).

In Team Explorer 2010, you can simply turn on the "Show Deleted Files" option and navigate to the original folder, you'll be able to then see the file that was moved or deleted. You can view history on the item to see its last changeset - this will show you whether it was outright deleted, or if it was just renamed and thus the item no longer exists in the current path name (aka "slot") and was deleted that way. You can further drill down in to changeset details for that changeset to see the new path name (slot) that item occupies.

正如您所提到的,您当然可以使用 GetItems 方法通过对 TFS API 的一些 bash 来完成此操作.虽然我知道这不是您想要做的,但我认为值得一提的是,因为 TFS API 非常容易使用.

As you mention, you could certainly do this with a little bash against the TFS API using the GetItems method. Though I understand that it's not what you want to do, I thought it worth saying just because the TFS API is surprisingly easy to work with.

这篇关于TFS:按旧名称查找移动的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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