##// END OF EJS Templates
File size display with Bazaar repositories (#1149)....
Jean-Philippe Lang -
r1523:b1a8790a36ea
parent child
Show More
@@ -34,6 +34,11 class Repository::Bazaar < Repository
34 if entries
34 if entries
35 entries.each do |e|
35 entries.each do |e|
36 next if e.lastrev.revision.blank?
36 next if e.lastrev.revision.blank?
37 # Set the filesize unless browsing a specific revision
38 if identifier.nil? && e.is_file?
39 full_path = File.join(root_url, e.path)
40 e.size = File.stat(full_path).size if File.file?(full_path)
41 end
37 c = Change.find(:first,
42 c = Change.find(:first,
38 :include => :changeset,
43 :include => :changeset,
39 :conditions => ["#{Change.table_name}.revision = ? and #{Changeset.table_name}.repository_id = ?", e.lastrev.revision, id],
44 :conditions => ["#{Change.table_name}.revision = ? and #{Changeset.table_name}.repository_id = ?", e.lastrev.revision, id],
General Comments 0
You need to be logged in to leave comments. Login now