This tool is improving the merge functionality that Visual Studio has for TFS. It supports baseless merging, as well as easy merging of non-consecutive changesets. It auto-associates the TFS items linked to the original changesets. It allows you to merge(unshelve) a shelveset into a specific branch.
There are two ways to initiate a merge using this plugin:
1. Cherry pick changesets from History
Using Source Control Explorer in Visual Studio, get the history for any folder or file. Select one or more changesets in the list and right-click your selection. The context menu will now have a 'Merge...' option. Clicking this will give an overview of the selected changesets and files associated with those changesets.
2. Extensive search for changesets
In Source Control Explorer in Visual Studio, right-click your branch, and choose the new menu-option ‘Merge Changeset By Comment’.
After that, enter the TFS item under phrase. This will only search comment-texts, so be sure to add the TFS item number as part of your comment with your checkins.
It will show you all Changesets, and Files associated with the TFS Item:
If searching for a comment with an identifier, and one found file has 3 changesets, of which the 1st and the 3rd have the identifier in the comment text, the second changeset ('changeset-inbetween') will be included when merging, to ease the merging process. The files which have a changeset-inbetween are indicated with a notification-icon. Double-clicking that file will show the file history to help you find out which lines of code you may want to prevent from being merged, when reviewing your pending changes.
Next step is clicking the 'Merge' button, after which you can choose from an eligible merge destination. You can type in a custom path, which will trigger a baseless merge.
Then check your pending changes and resolve conflicts as you normally would.
Unshelving: The Find Shelveset window has been extended to allow unshelving into a specific branch. To do this, simply right-click a shelveset, and choose 'Unshelve to branch...'
Next, choose you branch from the dropdown. It shows you the normal branch-relations, but you can type your specific branch name instead of choosing to do a baseless merge/unshelve. Don't forget to do a GetLatest of the target branch before unshelving! It will automerge by default. When there's a conflict detected, it will take the shelved version of the file.
Afterwards, check the output window for unshelving-details.
Handy merge-tips: Tip 1. You can search for multiple TFS Items, and merge then in one go by checking 'Keep previous found changesets' , filling in a next tfs item and hit search again. Useful when merging all changes for a large user story, and checking them in under a single TFS item.
Tip 2. You can merge all changes for each file by checking 'Merge all changes to files' , regardless if the changes have been made by your particular tfs checkin. So it’s basicly merging the latest status of a file to the next branch. Be sure to check your pending changes with this one.
Version History version 1.1.12: Alphabetically order the available branches.
version 1.1.10: Option to include intersecting files & fix incorrect detection of source branch when unshelving.
Version 188.8.131.52: Have more granular control which files are included in the merge using checkboxes. Use tooltip to quickly discover missing changeset. When merging a complex set of changesets which includes added folders/files, it no longer magically includes files from intersecting changesets.
Version 184.108.40.206: fixed a duplicate dictionary key-issue when unshelving
Version 220.127.116.11: added the ability to Unshelve into a different branch
Version 18.104.22.168: removed Visual Studio 2019 support from plugin, as it used incompatible visual studio dll's. Created a seperate versioned plugin instead, found here
Version 22.214.171.124: TFS item linking was broken because of cross thread accessing the UI
Version 126.96.36.199: Support merging files from branches without local files/contents (merge server items only).
Version 188.8.131.52: Async refactor issue: properly report 'successful merge with conflicts' as 'succesfull with conflicts', instead of 'failed merge'. Also tidying up logging to output.
Version 184.108.40.206: Large changesets-improvements a: Changesets with large files numbers (1000+) are processed much(!) faster now. b: Merging one changeset reverts to a 'vanilla TFS merge', skipping the file-by-file-merge-analysis. c: When merging 100+ files: gives the option to skip destination branch analysis. Useful when user knows all files are present in destination branch. d: Errors are now logged to the Visual Studio output window [better managing of huge amount of errors]. e: Better async: Package is now inheriting AsyncPackage & merge process is now done truly asynchronous (was blocking the UI somewhat).
Version 220.127.116.11: Added TFS History: changeset cherry picking merge functionality
Version 18.104.22.168: A baseless rootfolder merge is now supported: when choosing a merge path, typing in a completely different path will cause the entire merge to be performed 'baseless'.
Version 22.214.171.124: Automatically associate Work Items at pending changes for merged changesets
Version 126.96.36.199: Include support for Visual Studio 2019
Version 188.8.131.52: When a individual file/folder merge is detected to be baseless, it no longer halts the merge, but rather continues to merge the other files and lists the failed files/folders.
Version 184.108.40.206: Now properly indicates insufficient permissions failures, and a folder merge-identification issue, which made it skip merging certain files in very specific scenarios with duplicate parent/child foldernames.
Version 220.127.116.11: Initial version based on plugin for Visual Studio 2015
Kudo's: This merge tool is based on 'Find changeset by comment', which lacked Merge functionality. This triggered me to dig into making an extension for Visual Studio.