@@ -78,7 +78,7 class Repository < ActiveRecord::Base | |||||
78 | # Default behaviour: we search in cached changesets |
|
78 | # Default behaviour: we search in cached changesets | |
79 | def changesets_for_path(path) |
|
79 | def changesets_for_path(path) | |
80 | path = "/#{path}" unless path.starts_with?('/') |
|
80 | path = "/#{path}" unless path.starts_with?('/') | |
81 | Change.find(:all, :include => :changeset, |
|
81 | Change.find(:all, :include => {:changeset => :user}, | |
82 | :conditions => ["repository_id = ? AND path = ?", id, path], |
|
82 | :conditions => ["repository_id = ? AND path = ?", id, path], | |
83 | :order => "committed_on DESC, #{Changeset.table_name}.id DESC").collect(&:changeset) |
|
83 | :order => "committed_on DESC, #{Changeset.table_name}.id DESC").collect(&:changeset) | |
84 | end |
|
84 | end |
@@ -30,7 +30,7 class Repository::Git < Repository | |||||
30 | end |
|
30 | end | |
31 |
|
31 | |||
32 | def changesets_for_path(path) |
|
32 | def changesets_for_path(path) | |
33 | Change.find(:all, :include => :changeset, |
|
33 | Change.find(:all, :include => {:changeset => :user}, | |
34 | :conditions => ["repository_id = ? AND path = ?", id, path], |
|
34 | :conditions => ["repository_id = ? AND path = ?", id, path], | |
35 | :order => "committed_on DESC, #{Changeset.table_name}.revision DESC").collect(&:changeset) |
|
35 | :order => "committed_on DESC, #{Changeset.table_name}.revision DESC").collect(&:changeset) | |
36 | end |
|
36 | end |
@@ -32,7 +32,7 class Repository::Subversion < Repository | |||||
32 |
|
32 | |||
33 | def changesets_for_path(path) |
|
33 | def changesets_for_path(path) | |
34 | revisions = scm.revisions(path) |
|
34 | revisions = scm.revisions(path) | |
35 | revisions ? changesets.find_all_by_revision(revisions.collect(&:identifier), :order => "committed_on DESC") : [] |
|
35 | revisions ? changesets.find_all_by_revision(revisions.collect(&:identifier), :order => "committed_on DESC", :include => :user) : [] | |
36 | end |
|
36 | end | |
37 |
|
37 | |||
38 | # Returns a path relative to the url of the repository |
|
38 | # Returns a path relative to the url of the repository |
General Comments 0
You need to be logged in to leave comments.
Login now