##// END OF EJS Templates
scm: mercurial: use revision text mercurial style "2:400bb8672109" (#3724)....
Toshi MARUYAMA -
r4577:fdd0a2ca9b72
parent child
Show More
@@ -34,8 +34,7 class Repository::Mercurial < Repository
34
34
35 # Returns the readable identifier for the given mercurial changeset
35 # Returns the readable identifier for the given mercurial changeset
36 def self.format_changeset_identifier(changeset)
36 def self.format_changeset_identifier(changeset)
37 # "#{changeset.revision}:#{changeset.scmid}"
37 "#{changeset.revision}:#{changeset.scmid}"
38 changeset.revision
39 end
38 end
40
39
41 # Returns the identifier for the given Mercurial changeset
40 # Returns the identifier for the given Mercurial changeset
@@ -146,6 +146,23 class RepositoryMercurialTest < ActiveSupport::TestCase
146 c = @repository.changesets.find_by_revision('2')
146 c = @repository.changesets.find_by_revision('2')
147 assert_equal c.scmid, c.identifier
147 assert_equal c.scmid, c.identifier
148 end
148 end
149
150 def test_format_identifier
151 @repository.fetch_changesets
152 @repository.reload
153 c = @repository.changesets.find_by_revision('2')
154 assert_equal '2:400bb8672109', c.format_identifier
155 end
156
157 def test_activities
158 c = Changeset.new(:repository => @repository,
159 :committed_on => Time.now,
160 :revision => '123',
161 :scmid => 'abc400bb8672',
162 :comments => 'test')
163 assert c.event_title.include?('123:abc400bb8672:')
164 assert_equal 'abc400bb8672', c.event_url[:rev]
165 end
149 else
166 else
150 puts "Mercurial test repository NOT FOUND. Skipping unit tests !!!"
167 puts "Mercurial test repository NOT FOUND. Skipping unit tests !!!"
151 def test_fake; assert true end
168 def test_fake; assert true end
General Comments 0
You need to be logged in to leave comments. Login now