diff --git a/pylons_app/controllers/feed.py b/pylons_app/controllers/feed.py --- a/pylons_app/controllers/feed.py +++ b/pylons_app/controllers/feed.py @@ -24,7 +24,7 @@ feed controller for pylons """ from pylons import tmpl_context as c, url, response from pylons_app.lib.base import BaseController, render -from pylons_app.model.hg_model import _full_changelog_cached +from pylons_app.model.hg_model import HgModel from webhelpers.feedgenerator import Atom1Feed, Rss201rev2Feed import logging log = logging.getLogger(__name__) @@ -49,10 +49,9 @@ class FeedController(BaseController): language=self.language, ttl=self.ttl) - - for cnt, cs in enumerate(_full_changelog_cached(repo_name)): - if cnt > self.feed_nr: - break + changesets = HgModel().get_repo(repo_name) + + for cs in changesets[:self.feed_nr]: feed.add_item(title=cs.message, link=url('changeset_home', repo_name=repo_name, revision=cs.raw_id, qualified=True), @@ -70,11 +69,11 @@ class FeedController(BaseController): language=self.language, ttl=self.ttl) - for cnt, cs in enumerate(_full_changelog_cached(repo_name)): - if cnt > self.feed_nr: - break + changesets = HgModel().get_repo(repo_name) + for cs in changesets[:self.feed_nr]: feed.add_item(title=cs.message, - link=url('changeset_home', repo_name=repo_name, revision=cs.raw_id, qualified=True), + link=url('changeset_home', repo_name=repo_name, + revision=cs.raw_id, qualified=True), description=str(cs.date)) response.content_type = feed.mime_type