bzr_size.patch

Patch for file size display with Bazaar - Andreas Deininger, 2008-05-02 08:35

Download (778 Bytes)

View differences:

app/models/repository/bazaar.rb (Arbeitskopie)
34 34
    if entries
35 35
      entries.each do |e|
36 36
        next if e.lastrev.revision.blank?
37
        # Set the filesize unless browsing a specific revision
38
        if identifier.nil?
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 42
        c = Change.find(:first,
38 43
                        :include => :changeset,
39 44
                        :conditions => ["#{Change.table_name}.revision = ? and #{Changeset.table_name}.repository_id = ?", e.lastrev.revision, id],