CodeLens has been a blockbuster feature in Visual Studio 2013. Consistently it is listed among the best loved features for the release. We continue to work on it and in Visual Studio 2013 Update 2 CTP2 , we are releasing a new indicator called Incoming Changes.
To recap, CodeLens is a heads-up display in your Visual Studio Editor where you can find information about your code in-context. Here is a quick screenshot to jog your memory.
There is an excellent MSDN article introducing CodeLens and I recommend you read it if you have not looked at CodeLens earlier – Find code info directly in the editor using CodeLens.
In order to try out this feature you need
1. Visual Studio 2013 Update 2 CTP2 client IDE
2. Team Foundation Server 2013 Update 2 RC (also available in the same download link above).
Incoming Changes Overview
If your team uses multiple branches in Team Foundation Server Version control, you need to know changes occurring in various branches on the code element you are working on. The new CodeLens Indicator – Incoming Changes provides this information. Previously, you had to run multiple version control commands to get this information. Now you get it in one click.
For demonstrating this feature, I am using the FabrikamFiber sample application. I have created the following set of branches.
Now I make a change and check it into the FabrikamFiber-Dev-UI branch. When I look at the code element in FabrikamFiber.CallCenter branch, I see the following CodeLens Incoming Changes Indicator.
You can bring up the Detail window by clicking on the indicator or pressing Alt+6 inside the method or class.
Source Branch for Incoming Change
The icon next to the branch name gives you information on the relationship of the source branch with the current branch.
Other types of icons that can appear are
Change is coming from a parent branch
Change is coming from a peer branch
Change is coming as a Reverse Integration from child branch to its parent
Change is coming as a Forward integration from a branch to its child
Change is coming from a branch further away than a parent, child or peer relationship
Change is coming as a baseless merge from an unrelated branch
For each incoming change listed in the detail window, you can perform additional operations.
· You can compare the incoming change with the local version to identify exactly what has changed.
· You can view more details of the Incoming Change
· You can track how the changeset is progressing in the branch hierarchy.
Here you can see that the Incoming Change (with changeset #13) is present only in the FabrikamFiber-Dev-UI branch and has not been merged into any other branch now.
· You can ignore a particular branch if you are not interested in activity from that branch.
· You can also hide intermediate branch merges. This is especially useful when there are lot of activities happening in the branches and you want to get a more concise view. NOTE that we have turned it on by default. If you want to see all changes, you can uncheck this option.
Here is a stage in the development process with lots of changes and merge activity among the branches.
If you uncheck “Hide Intermediate Branch Merges”, you will get a more detailed view.
· Connect to the Author via IM, Video, Email, Lync Call or Voice Call.
Please note that many of these actions (e.g:- Changeset Details & Track Changeset) are already possible from Team Explorer; CodeLens provides a much more convenient entry point into them directly from code.
Turn it off
If for any reason, you don’t want to see this indicator, you can turn it off in Tools->Options.
Right click on the CodeLens Indicator line and the following menu will appear.
If you choose “CodeLens Options”, the Tools->Options dialog for CodeLens is shown. You can disable “Show Incoming Changes” to hide this indicator.
As always, we are interested in hearing your feedback on this feature. Try it out and let us know.