Project activities perfomance increased. Cache for project activitites disabled. Repository conception changed

This commit is contained in:
Dmitriy Zaporozhets 2012-01-04 08:17:41 +02:00
parent ac62036320
commit 0ebc610e49
10 changed files with 64 additions and 4 deletions

View file

@ -112,6 +112,16 @@ class Repository
commits[0...n]
end
def commits_with_refs(n = 20)
commits = repo.refs.map { |ref| Commit.new(ref.commit, ref) }
commits.sort! do |x, y|
y.committed_date <=> x.committed_date
end[0..n]
commits
end
def commits_since(date)
commits = heads.map do |h|
repo.log(h.name, nil, :since => date).each { |c| Commit.new(c, h) }