diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-01 08:46:47 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-01 08:46:47 +0000 |
commit | f2ec6f8d77ec1fd9f00ab1c24dc1379c70245f6b (patch) | |
tree | 57b8e833b86f2813706d68d3f1038e9daa420f69 /app | |
parent | ae68ff11004d6a0bae0affd41b3a9823c30fb75c (diff) | |
download | redmine-f2ec6f8d77ec1fd9f00ab1c24dc1379c70245f6b.tar.gz redmine-f2ec6f8d77ec1fd9f00ab1c24dc1379c70245f6b.zip |
back out r12752 (#14361)
Revision, Author and Comment of repository browser are broken.
git-svn-id: http://svn.redmine.org/redmine/trunk@12753 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/repository/mercurial.rb | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/app/models/repository/mercurial.rb b/app/models/repository/mercurial.rb index 42ac32913..5eedbb7eb 100644 --- a/app/models/repository/mercurial.rb +++ b/app/models/repository/mercurial.rb @@ -152,24 +152,16 @@ class Repository::Mercurial < Repository (db_rev + 1).step(scm_rev, FETCH_AT_ONCE) do |i| scm.each_revision('', i, [i + FETCH_AT_ONCE - 1, scm_rev].min) do |re| transaction do - scmid = re.scmid[0, 12] - parents = (re.parents || []).collect do |rp| - find_changeset_by_name(rp[0, 12]) - end.compact + parents = (re.parents || []).collect{|rp| find_changeset_by_name(rp)}.compact cs = Changeset.create(:repository => self, :revision => re.revision, - :scmid => scmid, + :scmid => re.scmid, :committer => re.author, :committed_on => re.time, :comments => re.message, :parents => parents) unless cs.new_record? - re.paths.each do |e| - if from_revision = e[:from_revision] - e[:from_revision] = from_revision[0, 12] - end - cs.create_change(e) - end + re.paths.each { |e| cs.create_change(e) } end end end |