@@ -79,7 +79,28 class Repository::Git < Repository | |||
|
79 | 79 | revisions.reject!{|r| recent_revisions.include?(r.scmid)} |
|
80 | 80 | |
|
81 | 81 | # Save the remaining ones to the database |
|
82 |
|
|
|
82 | unless revisions.nil? | |
|
83 | revisions.each do |rev| | |
|
84 | transaction do | |
|
85 | changeset = Changeset.new( | |
|
86 | :repository => self, | |
|
87 | :revision => rev.identifier, | |
|
88 | :scmid => rev.scmid, | |
|
89 | :committer => rev.author, | |
|
90 | :committed_on => rev.time, | |
|
91 | :comments => rev.message) | |
|
92 | ||
|
93 | if changeset.save | |
|
94 | rev.paths.each do |file| | |
|
95 | Change.create( | |
|
96 | :changeset => changeset, | |
|
97 | :action => file[:action], | |
|
98 | :path => file[:path]) | |
|
99 | end | |
|
100 | end | |
|
101 | end | |
|
102 | end | |
|
103 | end | |
|
83 | 104 | end |
|
84 | 105 | |
|
85 | 106 | def latest_changesets(path,rev,limit=10) |
@@ -324,27 +324,6 module Redmine | |||
|
324 | 324 | def format_identifier |
|
325 | 325 | identifier |
|
326 | 326 | end |
|
327 | ||
|
328 | def save(repo) | |
|
329 | Changeset.transaction do | |
|
330 | changeset = Changeset.new( | |
|
331 | :repository => repo, | |
|
332 | :revision => identifier, | |
|
333 | :scmid => scmid, | |
|
334 | :committer => author, | |
|
335 | :committed_on => time, | |
|
336 | :comments => message) | |
|
337 | ||
|
338 | if changeset.save | |
|
339 | paths.each do |file| | |
|
340 | Change.create( | |
|
341 | :changeset => changeset, | |
|
342 | :action => file[:action], | |
|
343 | :path => file[:path]) | |
|
344 | end | |
|
345 | end | |
|
346 | end | |
|
347 | end | |
|
348 | 327 | end |
|
349 | 328 | |
|
350 | 329 | class Annotate |
General Comments 0
You need to be logged in to leave comments.
Login now