class TFSGraph::BranchAssociator

Public Class Methods

associate(changesets) click to toggle source
# File lib/tfs_graph/associators/branch_associator.rb, line 12
def associate(changesets)
  return if changesets.empty?

  change = changesets.first
  root = change.merges.max

  return if root.nil?

  change.parent = root.id
  change.save!
end
associate_groups(sets_by_branch) click to toggle source

sets up parent/child relationships

# File lib/tfs_graph/associators/branch_associator.rb, line 6
def associate_groups(sets_by_branch)
  sets_by_branch.each do |group|
    associate(group)
  end
end