diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-02-16 13:35:52 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-02-16 13:35:52 +0000 |
commit | 1f836a1d43a5f216955df3f156ce86cc857c9d92 (patch) | |
tree | 62142718b2a9052e607e1f9346978068d5217043 /app/models | |
parent | 05210f18ed3194f149e755194d1e75f118d1bc9a (diff) | |
download | redmine-1f836a1d43a5f216955df3f156ce86cc857c9d92.tar.gz redmine-1f836a1d43a5f216955df3f156ce86cc857c9d92.zip |
scm: mercurial: rewrite MercurialAdapter#entries to show per-file change log and size (#3421, #4455).
Contributed by Yuya Nishihara.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4856 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/repository/mercurial.rb | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/app/models/repository/mercurial.rb b/app/models/repository/mercurial.rb index d8b92a0eb..4ee76f442 100644 --- a/app/models/repository/mercurial.rb +++ b/app/models/repository/mercurial.rb @@ -48,29 +48,6 @@ class Repository::Mercurial < Repository super(cs, cs_to, ' ') end - def entries(path=nil, identifier=nil) - entries=scm.entries(path, identifier) - if entries - entries.each do |entry| - next unless entry.is_file? - # Set the filesize unless browsing a specific revision - if identifier.nil? - full_path = File.join(root_url, entry.path) - entry.size = File.stat(full_path).size if File.file?(full_path) - end - # Search the DB for the entry's last change - change = changes.find(:first, :conditions => ["path = ?", scm.with_leading_slash(entry.path)], :order => "#{Changeset.table_name}.committed_on DESC") - if change - entry.lastrev.identifier = change.changeset.revision - entry.lastrev.name = change.changeset.revision - entry.lastrev.author = change.changeset.committer - entry.lastrev.revision = change.revision - end - end - end - entries - end - # Finds and returns a revision with a number or the beginning of a hash def find_changeset_by_name(name) return nil if name.nil? || name.empty? |