]> source.dussan.org Git - redmine.git/commitdiff
scm: bazaar: code clean up model.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 18 May 2011 07:11:41 +0000 (07:11 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 18 May 2011 07:11:41 +0000 (07:11 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5834 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/repository/bazaar.rb

index 1398729f845866100a0476662f1554aba5e7bec2..b290bc8b0d2ba49a914c10dbef776a2a0abee6a0 100644 (file)
@@ -47,14 +47,19 @@ class Repository::Bazaar < Repository
           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],
-                        :order => "#{Changeset.table_name}.revision DESC")
+        c = Change.find(
+               :first,
+               :include    => :changeset,
+               :conditions => [
+                   "#{Change.table_name}.revision = ? and #{Changeset.table_name}.repository_id = ?",
+                   e.lastrev.revision,
+                   id
+                   ],
+               :order => "#{Changeset.table_name}.revision DESC")
         if c
           e.lastrev.identifier = c.changeset.revision
-          e.lastrev.name = c.changeset.revision
-          e.lastrev.author = c.changeset.committer
+          e.lastrev.name       = c.changeset.revision
+          e.lastrev.author     = c.changeset.committer
         end
       end
     end