class TFSGraph::Populators::ForBranch
incremental updates for a branch and its changesets does not update merges. have to do that once all changesets for a project are fetched
Public Class Methods
new(project, branch)
click to toggle source
# File lib/tfs_graph/populators/for_branch.rb, line 10 def initialize(project, branch) @project = project @branch = branch @changeset_store = ChangesetStore.new(branch) end
Public Instance Methods
populate()
click to toggle source
# File lib/tfs_graph/populators/for_branch.rb, line 17 def populate populate_since(@branch.last_updated.iso8601) end
populate_since(time)
click to toggle source
# File lib/tfs_graph/populators/for_branch.rb, line 21 def populate_since(time) new_changesets = @changeset_store.fetch_since_date(time) @changeset_store.cache_all new_changesets # skip rebuilding tree or marking as updated if no new were found return new_changesets if new_changesets.empty? ChangesetTreeBuilder.to_tree(@branch, @branch.changesets.sort) @branch.updated! new_changesets end