scm: mercurial: change identifier to revision in fetching revisions.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4847 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-02-16 07:31:52 +00:00
parent 4fe8259017
commit 08ed9cb5d5
3 changed files with 6 additions and 6 deletions

View File

@ -112,7 +112,7 @@ class Repository::Mercurial < Repository
transaction do
revisions.each do |revision|
changeset = Changeset.create(:repository => self,
:revision => revision.identifier,
:revision => revision.revision,
:scmid => revision.scmid,
:committer => revision.author,
:committed_on => revision.time,

View File

@ -150,12 +150,12 @@ module Redmine
end
paths.sort! { |x,y| x[:path] <=> y[:path] }
revisions << Revision.new({:identifier => logentry.attributes['revision'],
revisions << Revision.new({:revision => logentry.attributes['revision'],
:scmid => logentry.attributes['node'],
:author => (logentry.elements['author'] ? logentry.elements['author'].text : ""),
:time => Time.parse(logentry.elements['date'].text).localtime,
:message => logentry.elements['msg'].text,
:paths => paths
:paths => paths,
})
end
rescue

View File

@ -55,14 +55,14 @@ begin
def test_revisions
revisions = @adapter.revisions(nil, 2, 4)
assert_equal 3, revisions.size
# assert_equal '2', revisions[0].revision
assert_equal '2', revisions[0].revision
assert_equal '400bb8672109', revisions[0].scmid
# assert_equal '4', revisions[2].revision
assert_equal '4', revisions[2].revision
assert_equal 'def6d2f1254a', revisions[2].scmid
revisions = @adapter.revisions(nil, 2, 4, {:limit => 2})
assert_equal 2, revisions.size
# assert_equal '2', revisions[0].revision
assert_equal '2', revisions[0].revision
assert_equal '400bb8672109', revisions[0].scmid
end