Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
194 views
in Technique[技术] by (71.8m points)

version control - TFS - getting history for specific line of code in Visual Studio

Is it possible to get history for specific line of code in Visual Studio, when using TFS as source control?

Before I used another source control (Vault), and I was able to get history for line of code and check who added/modified it. It looks like TFS lacks such functionality. Are there any reporting tools that can do this.

I'm using Visual Studio 2010 with TFS 2010.

question from:https://stackoverflow.com/questions/15928072/tfs-getting-history-for-specific-line-of-code-in-visual-studio

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

As far as I know, there is nothing like the complete history of one line, which could be very confusing and hard to identify for a version control. Nevertheless, TFS can show you who change the specific line the last time. Two ways to get this:

  1. Browse in Source Control Explorer to the file, right click it and in the middle of the context menu, you will find the option Annotate, which will show it to you.

  2. Open the file you are interested in. Right click somewhere in the edit pane and choose Source Control -> Annotate


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...