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:
parent
4fe8259017
commit
08ed9cb5d5
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue