summaryrefslogtreecommitdiffstats
path: root/app/models/repository
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-23 15:11:40 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-23 15:11:40 +0000
commit5600c3cf5afd54c6e3c9fb1ccd0b1922310577db (patch)
tree396e4d650e278499d9e9af8c621d9f25f06f1297 /app/models/repository
parentcff0fb1855ace5fbca5c41d9df7d8497d9d3b7dd (diff)
downloadredmine-5600c3cf5afd54c6e3c9fb1ccd0b1922310577db.tar.gz
redmine-5600c3cf5afd54c6e3c9fb1ccd0b1922310577db.zip
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
Diffstat (limited to 'app/models/repository')
-rw-r--r--app/models/repository/subversion.rb27
1 files changed, 15 insertions, 12 deletions
diff --git a/app/models/repository/subversion.rb b/app/models/repository/subversion.rb
index f6e37fbd6..c42ffd495 100644
--- a/app/models/repository/subversion.rb
+++ b/app/models/repository/subversion.rb
@@ -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