entries = scm.entries(path, rev.nil? ? nil : rev.committed_on)
if entries
entries.each() do |entry|
- unless entry.lastrev.nil? || entry.lastrev.identifier
+ if ( ! entry.lastrev.nil? ) && ( ! entry.lastrev.revision.nil? )
change=changes.find_by_revision_and_path(
entry.lastrev.revision,
scm.with_leading_slash(entry.path) )
if change
entry.lastrev.identifier = change.changeset.revision
+ entry.lastrev.revision = change.changeset.revision
entry.lastrev.author = change.changeset.committer
- entry.lastrev.revision = change.revision
- entry.lastrev.branch = change.branch
+ # entry.lastrev.branch = change.branch
end
end
end
assert entries.detect {|e| e.name == 'watchers_controller.rb'}
assert_nil entries.detect {|e| e.name == 'welcome_controller.rb'}
end
+
+ def test_entries_rev3
+ @repository.fetch_changesets
+ @repository.reload
+ entries = @repository.entries('', '3')
+ assert_equal 3, entries.size
+ assert_equal entries[2].name, "README"
+ assert_equal entries[2].lastrev.time, Time.gm(2007, 12, 13, 16, 27, 22)
+ assert_equal entries[2].lastrev.identifier, '3'
+ assert_equal entries[2].lastrev.revision, '3'
+ assert_equal entries[2].lastrev.author, 'LANG'
+ end
else
puts "CVS test repository NOT FOUND. Skipping unit tests !!!"
def test_fake; assert true end