OSDN Git Service
(root)
/
redminele
/
redmine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34bcd5b
)
File size display with Bazaar repositories (#1149).
author
Jean-Philippe Lang
<jp_lang@yahoo.fr>
Sat, 14 Jun 2008 15:44:36 +0000
(15:44 +0000)
committer
Jean-Philippe Lang
<jp_lang@yahoo.fr>
Sat, 14 Jun 2008 15:44:36 +0000
(15:44 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1537
e93f8b46
-1217-0410-a6f0-
8f06a7374b81
app/models/repository/bazaar.rb
patch
|
blob
|
history
diff --git
a/app/models/repository/bazaar.rb
b/app/models/repository/bazaar.rb
index
1b75066
..
ec953bd
100644
(file)
--- 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],