Learn to use Visual Studio, Visual Studio Online, Application Insights and Team
Foundation Server to decrease rework, increase transparency into your application and increase the rate at which
you can ship high quality software throughout the application lifecycle
Yesterday we released Visual Studio 2013 Update 3 CTP1. This CTP brings new features in the area of CodeLens Team indicators. In this Blog post I'll present the CodeLens Team indicators for Git.
CodeLens is a heads-up display in your Visual Studio 2013 Ultimate editor where you can find information about your code in context. If you are not familiar with CodeLens, please see the following MSDN article Get history and other info about your code. Some of the CodeLens indicator for Team Foundation Server Version Control (TfVc) enable you to quickly identify the changes that have happened on the code and the authors of these changes. You can also see the code reviews, work-items and bugs associated with the changes. In addition, since Visual Studio 2013 Update 2, CodeLens shows you incoming changes from other branches. These CodeLens Indicators (Changes, Authors, Code Reviews, Work Items, Bugs & Incoming Changes) are collectively called Team Indicators.
Because they are computed on the server, they required you to connect to t least Team Foundation Server 2013.
Many of you have found CodeLens Team Indicators very useful, and even cool, but you asked us to extend the support of CodeLens Team indicators to other source control systems, including Git and Visual Studio online.
We are excited to announce that we are providing a preview of the CodeLens Team indicators for Git. With Visual Studio 2013 Update 3 CTP1, you will only get the Authors and Change indicators for Git, but that is just a start: a work item indicator will follow soon. The User experience with the CodeLens Authors and Change indicators for Git is very similar to the one you get with Team Foundation Version Control (TfVC), but of course this is about Git commits rather than changesets (see details below)
But there is another big difference: the CodeLens Team Indicators for Git are computed on the client side. This means that you will get them for any Git repository, either local, or cloned from TfGit, or even cloned from GitHub or other Git sources.
In the example below, I've cloned the Roslyn open source repository from https://git01.codeplex.com/roslyn and opened the Roslyn solution. Let's say that I'm working on a (hypothetical) problem where I'm trying to understand if some recent changes could have provoked a bug I'm investigating. For this, in the Workspaces\Workspaces project, I've opened the SemanticModelWorkspaceServiceFactory.cs. I'm looking at the GetSemanticModelForNodeAsync method
Similar to what we have in TfVc, I can see, in addition to the references indicators, that this method was last changed by mattwar, and another person did a change, and there were two changes overall:
Clicking on the author indicator (or the changes indicators: for the moment, the details are the same), I can see similar information to what we have in TfVc:
Hovering on a line corresponding to a Commit in the Commit Details window shows a tooltip giving more detail:
Right-clicking on a line corresponding to a Commit shows the contextual actions for this commit:
Requesting the Commit Details shows the details in Team Explorer. That will be a good location if you want to copy the commit short Id to use with command line tools, if you are used to using them. We know that for some of you this is important.
Note that the Commit Details window shows you all the files in the commit, which is desirable for you to understand the whole story. However, if you are only interested in the changes for the file you are looking at, you can use the "View Options" drop down and choose to Show the Filter
Then you'll have to type, or copy / paste the name of the file (personally, if I'm only interested in seeing this file, I'd paste the full path that I would have got from the "Copy Full Path" contextual command on the file tab).
From there you can compare the changes in this file with the previous version if you wish.
In this CTP, the indicators will not yet refresh automatically when you Commit a change, pull or Sync from a remote repository, or change the branch. This will be available in a later CTP or version of Visual Studio 2013 Update 3.
There is a work around which is to manually refresh the indicators by right-clicking on an indicator and clicking on "Refresh CodeLens Team Indicators"
If you are not interested in seeing the Git Team Indicators, you can disable them through the CodeLens Options contextual command above, or through Tools | Options [ Text Editor / All Languages / CodeLens]:
As always, we are interested in hearing your feedback on this feature. Please try it out, and let us know.
1) The Microsoft Git Provider seems to break R# under certain conditions. resharper-support.jetbrains.com/.../24790716--Refactoring-failed-Files-still-read-only-error-message-when-applying-Quick-Fix
2) Can you please bring CodeLens to Premium? I live in Australia and Ultimate is just not affordable (it's arbitrarily 2x more expensive in AU$ than US$ -- AU$21,201.00 vs US$13,299.00).
Great feature that would assist a lot of regular developers that is unfortunately locked away in the Ultimate edition. I'm in Australia too, and the $21k+ price tag is kind of ridiculous.
Great feature. Really significant for many developers. But I'm agree with previous commentators, as git indicators can interact directly with any Git repository, it's a shame that this feature is dedicated to Ultimate edition.
At least for git, any chance to deliver this feature as a special visual studio extension ?
I second #2 by @ta.speaot.is. It would be amazing to have CodeLens available in something other than Ultimate!
Was reading this then I realized that I only have a VS 2013 Professional licence... waste of time... keep it up MSFT
Thank you for indicating this is an Ultimate-only feature in the title. It saves those of us who don't have Ultimate time trying to figure out which edition the feature is in.
In Poland you have to pay 70 356 zł for Ultimate Edition, it's US$23 000 ( 1 US dolar == 3.0532 zł )
Do you really think that in a country where the average salary is approximately US$1200 per month someone will pay 23 thousands for a developer tool? NEVER
Is there anything in the Visual Studio SDK to add some custom code lens indicators? For example I would love to be able to code an indicator that would show the JIRA issues associated with a git commit, as we don't use TFS.
As for Ultimate, it isn't the price that is so much the problem, the real problem is that there isn't enough stuff in Ultimate that isn't in Premium to justify the price jump. Code Lens and Intellitrace are great, but are they worth an extra $10,000 per user? It feels like Microsoft should put more functionality in Ultimate, or just kill the SKU and make Premium to top SKU.
Nice, but crazy price, especially for GIT.
Very few people in the world get to see Ultimate...
I suspect the majority of those using GIT does not have Ultimate stop wasting your time.
Is that compatible with Visual Studio Online?
To Gil: yes, this is compatible with VSO, if you use Git repositories in VSO, of course.
I'm using GitHub enterprise. I'm seeing the "work item" shortcuts, however when I click on it, I get this message:
"Unable to determine the team project collection. Please connect to the appropriate team project collection and try again"
I am currently connected to the correct repo. If this is because you don't support GitHub enterprise and only TFS Git, then the 'work item' link shouldn't even be shown.
I know this is an old issue, but I got the same error ins Visual Studio 2015 using TFS Git until I realized that although I had connected to the Git repo in VS I hadn't actually connected to the TFS Server in in VS. Connecting to the TFS server fixed it.
Hopefully this helps someone else who like me stumbled across this article while trying to figure this out.