scm: git: set revisions ordering inconsistent in existing database (#5357).
Between version 0.9 r2840 (#1406) and version 1.2 r5073 (#7821, #5357), git revisions are stored as *C-B-A-F-E-D* in database. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5853 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
8dc8c625f6
commit
098655dbd0
|
@ -109,7 +109,17 @@ class Repository::Git < Repository
|
|||
scm_brs = branches
|
||||
return if scm_brs.nil? || scm_brs.empty?
|
||||
h = extra_info || {}
|
||||
h["branches"] ||= {}
|
||||
h["branches"] ||= {}
|
||||
h["db_consistent"] ||= {}
|
||||
if changesets.count == 0
|
||||
h["db_consistent"]["ordering"] = 1
|
||||
merge_extra_info(h)
|
||||
self.save
|
||||
elsif ! h["db_consistent"].has_key?("ordering")
|
||||
h["db_consistent"]["ordering"] = 0
|
||||
merge_extra_info(h)
|
||||
self.save
|
||||
end
|
||||
scm_brs.each do |br|
|
||||
from_scmid = nil
|
||||
from_scmid = h["branches"][br]["last_scmid"] if h["branches"][br]
|
||||
|
|
Loading…
Reference in New Issue