h1 = extra_info || {}
h = h1.dup
- repo_heads = scm_brs.map{|br| br.scmid}
+ repo_heads = scm_brs.map(&:scmid)
h["heads"] ||= []
prev_db_heads = h["heads"].dup
if prev_db_heads.empty?
offset = 0
revisions_copy = revisions.clone # revisions will change
while offset < revisions_copy.size
- scmids = revisions_copy.slice(offset, limit).map{|x| x.scmid}
+ scmids = revisions_copy.slice(offset, limit).map(&:scmid)
recent_changesets_slice = changesets.where(:scmid => scmids)
# Subtract revisions that redmine already knows about
- recent_revisions = recent_changesets_slice.map{|c| c.scmid}
+ recent_revisions = recent_changesets_slice.map(&:scmid)
revisions.reject!{|r| recent_revisions.include?(r.scmid)}
offset += limit
end
revisions = scm.revisions(path, nil, rev, :limit => limit, :all => false)
return [] if revisions.blank?
- changesets.where(:scmid => revisions.map {|c| c.scmid}).to_a
+ changesets.where(:scmid => revisions.map(&:scmid)).to_a
end
def clear_extra_info_of_changesets