title: TFS API - Get merged changesets
body: <p>I have a program that reads the lastest build and gets all the changesets from it. It is then possible to determine if the changset that I have it actually a merge, and where it was from.  </p>
  
  <p>Here's what I have:</p>
  
  <pre><code>List&lt;IChangesetSummary&gt; changeSets = InformationNodeConverters.GetAssociatedChangesets(build);
  IEnumerable&lt;Changeset&gt; changesetDetails = changeSets.Select(x =&gt; versionControlServer.GetChangeset(x.ChangesetId));
  
  // Determine is the first changeset was a merge
  changesetDetails.First().IsMerge // How to check is the changeset is part of a merge?
  </code></pre>
  
  <p>UPDATE:</p>
  
  <p>Following the answers so far I have updated </p>
  
  <pre><code>foreach (var cs in changesetDetails)
  {
      foreach (Change change in cs.Changes)
      {
          if ((change.ChangeType &amp; ChangeType.Merge) == 0)
              continue;
  
          foreach(var m in change.MergeSources)
  </code></pre>
  
  <p>But <code>MergeSources</code> is always empty.</p>