1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 15:01:14 +00:00

cleanup: rubocop: fix Style/MultilineIfModifier in app/models/repository/subversion.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@19215 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-11-23 15:11:40 +00:00
parent cff0fb1855
commit 5600c3cf5a
2 changed files with 15 additions and 13 deletions

View File

@ -1246,7 +1246,6 @@ Style/MultilineIfModifier:
- 'app/models/issue_query.rb'
- 'app/models/query.rb'
- 'app/models/repository/bazaar.rb'
- 'app/models/repository/subversion.rb'
- 'app/models/time_entry_query.rb'
- 'app/views/common/feed.atom.builder'
- 'lib/redmine/access_keys.rb'

View File

@ -68,19 +68,22 @@ class Repository::Subversion < Repository
# loads changesets by batches of 200
identifier_to = [identifier_from + 199, scm_revision].min
revisions = scm.revisions('', identifier_to, identifier_from, :with_paths => true)
revisions.reverse_each do |revision|
transaction do
changeset = Changeset.create(:repository => self,
:revision => revision.identifier,
:committer => revision.author,
:committed_on => revision.time,
:comments => revision.message)
revision.paths.each do |change|
changeset.create_change(change)
end unless changeset.new_record?
unless revisions.nil?
revisions.reverse_each do |revision|
transaction do
changeset = Changeset.create(:repository => self,
:revision => revision.identifier,
:committer => revision.author,
:committed_on => revision.time,
:comments => revision.message)
unless changeset.new_record?
revision.paths.each do |change|
changeset.create_change(change)
end
end
end
end
end unless revisions.nil?
end
identifier_from = identifier_to + 1
end
end