@@ -138,19 +138,21 class Repository::Mercurial < Repository | |||
|
138 | 138 | |
|
139 | 139 | logger.debug "Fetching changesets for repository #{url}" if logger |
|
140 | 140 | (db_rev + 1).step(scm_rev, FETCH_AT_ONCE) do |i| |
|
141 | transaction do | |
|
142 | scm.each_revision('', i, [i + FETCH_AT_ONCE - 1, scm_rev].min) do |re| | |
|
141 | scm.each_revision('', i, [i + FETCH_AT_ONCE - 1, scm_rev].min) do |re| | |
|
142 | transaction do | |
|
143 | 143 | cs = Changeset.create(:repository => self, |
|
144 | 144 | :revision => re.revision, |
|
145 | 145 | :scmid => re.scmid, |
|
146 | 146 | :committer => re.author, |
|
147 | 147 | :committed_on => re.time, |
|
148 | 148 | :comments => re.message) |
|
149 | re.paths.each { |e| cs.create_change(e) } | |
|
150 | parents = {} | |
|
151 | parents[cs] = re.parents unless re.parents.nil? | |
|
152 | parents.each do |ch, chparents| | |
|
153 | ch.parents = chparents.collect{|rp| find_changeset_by_name(rp)}.compact | |
|
149 | unless cs.new_record? | |
|
150 | re.paths.each { |e| cs.create_change(e) } | |
|
151 | parents = {} | |
|
152 | parents[cs] = re.parents unless re.parents.nil? | |
|
153 | parents.each do |ch, chparents| | |
|
154 | ch.parents = chparents.collect{|rp| find_changeset_by_name(rp)}.compact | |
|
155 | end | |
|
154 | 156 | end |
|
155 | 157 | end |
|
156 | 158 | end |
General Comments 0
You need to be logged in to leave comments.
Login now