Skip to content

Commit 7bd4590

Browse files
committed
Transaction for each imported subversion changeset.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2563 e93f8b46-1217-0410-a6f0-8f06a7374b81
1 parent 8375e98 commit 7bd4590

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/models/repository/subversion.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def fetch_changesets
5454
# loads changesets by batches of 200
5555
identifier_to = [identifier_from + 199, scm_revision].min
5656
revisions = scm.revisions('', identifier_to, identifier_from, :with_paths => true)
57-
transaction do
58-
revisions.reverse_each do |revision|
57+
revisions.reverse_each do |revision|
58+
transaction do
5959
changeset = Changeset.create(:repository => self,
6060
:revision => revision.identifier,
6161
:committer => revision.author,
@@ -68,7 +68,7 @@ def fetch_changesets
6868
:path => change[:path],
6969
:from_path => change[:from_path],
7070
:from_revision => change[:from_revision])
71-
end
71+
end unless changeset.new_record?
7272
end
7373
end unless revisions.nil?
7474
identifier_from = identifier_to + 1

0 commit comments

Comments
 (0)