Techdays Belgium 2010 – Session details

This year I presented a session at Techdays Belgium on Branching & Merging with Team Foundation Server 2010.

The session slides can be downloaded in the download section of this blog.

Watch recorded video (1 hour and 10 minutes) at Channel 9.

A demo on Branching & Merging with TFS2010 was the major part during the presentation and I did practically cover everything I wanted to share with the audience: Branch metadata, Fine-grained security, Branching Visualization, Tracking individual changesets across branches, forward/reverse integration … except for one little important merge action that I forgot to show!

After the creation of my dev branches (from main) I also renamed the solution in those dev branches with an additional suffix to avoid confusion while loading different solutions into Visual Studio 2010. This was done in changeset 121 and I renamed the solution from WebsiteSparkles to WebsiteSparkles_dev1.

DemoTechdays1

Afterwards I did some code changes in the dev branches and pushed some explicit changesets back (Reverse Integration) to the main branch, using the cherry pick option in the merge wizard to avoid merging also the solution rename.

As a result changeset 121 will always remain a merge candidate in the Source Control Merge Wizard.

DemoTechdays2

In some cases you really want to merge changes back to main on the latest version of the development branch without cherry-picking all required changesets. To be able to do that, you need to get rid of changeset 121 as a merge candidate.

This can only be done through the command-line with the tf merge /discard command.

DemoTechdays3

This discard command will make sure that changeset 121 will not be a merge candidate anymore. Note that you still need to commit this action to the repository after executing the command. The discard command will only update your local workspace but won’t do an automatic check-in.

DemoTechdays4

Next time you will run the merge wizard and look for merge candidates, changeset 121 won’t be listed anymore and you may merge from a latest version of this development branch for upcoming changes.

Providing this discard command from within the source control merge wizard would be a very nice addition!

3 Responses to Techdays Belgium 2010 – Session details

  1. Ken says:

    If you check in that discard changeset into the main branch, won’t it appear in the merge dialog when you do forward integration from main to your dev branch?

    You’ll end up with this scenario where you discard changesets back and forth, back and forth.

    http://social.msdn.microsoft.com/Forums/en/tfsgeneral/thread/f170d3da-a3ef-4a05-a83e-fbc89ab8d2da

  2. @Ken: doing forward integration from main to dev won’t bring this discarded changeset back into play. Only if you would do additional changes in that discarded changeset.

  3. Ken says:

    You’re right about the only if you do additional changes in that discarded changeset. That’s not a terribly uncommon case though – and from my explorations, there’s no way to then tell TFS “I know I didn’t completely merge that changset, but ignore it anyways – I don’t want to see it in the merge dialog anymore”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: