diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-06-14 15:44:36 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-06-14 15:44:36 +0000 |
commit | b1a8790a36ea854c2d079756307059e9f69751b5 (patch) | |
tree | 77e5380dc04b5ef847d91b9bf2ca0c7e26345117 | |
parent | 34bcd5b80b0e7e60e2c307b0dcc0d9113e68d4b7 (diff) | |
download | redmine-b1a8790a36ea854c2d079756307059e9f69751b5.tar.gz redmine-b1a8790a36ea854c2d079756307059e9f69751b5.zip |
File size display with Bazaar repositories (#1149).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1537 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/models/repository/bazaar.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/repository/bazaar.rb b/app/models/repository/bazaar.rb index 1b75066c2..ec953bd45 100644 --- a/app/models/repository/bazaar.rb +++ b/app/models/repository/bazaar.rb @@ -34,6 +34,11 @@ class Repository::Bazaar < Repository if entries entries.each do |e| next if e.lastrev.revision.blank? + # Set the filesize unless browsing a specific revision + if identifier.nil? && e.is_file? + full_path = File.join(root_url, e.path) + e.size = File.stat(full_path).size if File.file?(full_path) + end c = Change.find(:first, :include => :changeset, :conditions => ["#{Change.table_name}.revision = ? and #{Changeset.table_name}.repository_id = ?", e.lastrev.revision, id], |