@@ -1,16 +1,17 | |||||
1 |
# |
|
1 | # Redmine - project management software | |
2 |
# Copyright (C) 2006-20 |
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
3 | # Copyright (C) 2007 Patrick Aljord patcito@ŋmail.com |
|
3 | # Copyright (C) 2007 Patrick Aljord patcito@ŋmail.com | |
|
4 | # | |||
4 | # This program is free software; you can redistribute it and/or |
|
5 | # This program is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU General Public License |
|
6 | # modify it under the terms of the GNU General Public License | |
6 | # as published by the Free Software Foundation; either version 2 |
|
7 | # as published by the Free Software Foundation; either version 2 | |
7 | # of the License, or (at your option) any later version. |
|
8 | # of the License, or (at your option) any later version. | |
8 |
# |
|
9 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
10 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
13 | # GNU General Public License for more details. | |
13 |
# |
|
14 | # | |
14 | # You should have received a copy of the GNU General Public License |
|
15 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software |
|
16 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
@@ -84,7 +85,7 class Repository::Git < Repository | |||||
84 | # Mercurial fixed issues. |
|
85 | # Mercurial fixed issues. | |
85 | # * Redmine Takes Too Long On Large Mercurial Repository |
|
86 | # * Redmine Takes Too Long On Large Mercurial Repository | |
86 | # http://www.redmine.org/issues/3449 |
|
87 | # http://www.redmine.org/issues/3449 | |
87 |
# * Sorting for changesets might go wrong on Mercurial repos |
|
88 | # * Sorting for changesets might go wrong on Mercurial repos | |
88 | # http://www.redmine.org/issues/3567 |
|
89 | # http://www.redmine.org/issues/3567 | |
89 | # Database revision column is text, so Redmine can not sort by revision. |
|
90 | # Database revision column is text, so Redmine can not sort by revision. | |
90 | # Mercurial has revision number, and revision number guarantees revision order. |
|
91 | # Mercurial has revision number, and revision number guarantees revision order. | |
@@ -138,7 +139,7 class Repository::Git < Repository | |||||
138 | :repository => self, |
|
139 | :repository => self, | |
139 | :revision => rev.identifier, |
|
140 | :revision => rev.identifier, | |
140 | :scmid => rev.scmid, |
|
141 | :scmid => rev.scmid, | |
141 |
:committer => rev.author, |
|
142 | :committer => rev.author, | |
142 | :committed_on => rev.time, |
|
143 | :committed_on => rev.time, | |
143 | :comments => rev.message |
|
144 | :comments => rev.message | |
144 | ) |
|
145 | ) | |
@@ -158,9 +159,9 class Repository::Git < Repository | |||||
158 | return [] if revisions.nil? || revisions.empty? |
|
159 | return [] if revisions.nil? || revisions.empty? | |
159 |
|
160 | |||
160 | changesets.find( |
|
161 | changesets.find( | |
161 |
:all, |
|
162 | :all, | |
162 | :conditions => [ |
|
163 | :conditions => [ | |
163 |
"scmid IN (?)", |
|
164 | "scmid IN (?)", | |
164 | revisions.map!{|c| c.scmid} |
|
165 | revisions.map!{|c| c.scmid} | |
165 | ], |
|
166 | ], | |
166 | :order => 'committed_on DESC' |
|
167 | :order => 'committed_on DESC' |
General Comments 0
You need to be logged in to leave comments.
Login now