Show More
@@ -24,7 +24,7 feed controller for pylons | |||
|
24 | 24 | """ |
|
25 | 25 | from pylons import tmpl_context as c, url, response |
|
26 | 26 | from pylons_app.lib.base import BaseController, render |
|
27 |
from pylons_app.model.hg_model import |
|
|
27 | from pylons_app.model.hg_model import HgModel | |
|
28 | 28 | from webhelpers.feedgenerator import Atom1Feed, Rss201rev2Feed |
|
29 | 29 | import logging |
|
30 | 30 | log = logging.getLogger(__name__) |
@@ -49,10 +49,9 class FeedController(BaseController): | |||
|
49 | 49 | language=self.language, |
|
50 | 50 | ttl=self.ttl) |
|
51 | 51 | |
|
52 | changesets = HgModel().get_repo(repo_name) | |
|
52 | 53 | |
|
53 | for cnt, cs in enumerate(_full_changelog_cached(repo_name)): | |
|
54 | if cnt > self.feed_nr: | |
|
55 | break | |
|
54 | for cs in changesets[:self.feed_nr]: | |
|
56 | 55 | feed.add_item(title=cs.message, |
|
57 | 56 | link=url('changeset_home', repo_name=repo_name, |
|
58 | 57 | revision=cs.raw_id, qualified=True), |
@@ -70,11 +69,11 class FeedController(BaseController): | |||
|
70 | 69 | language=self.language, |
|
71 | 70 | ttl=self.ttl) |
|
72 | 71 | |
|
73 | for cnt, cs in enumerate(_full_changelog_cached(repo_name)): | |
|
74 |
|
|
|
75 | break | |
|
72 | changesets = HgModel().get_repo(repo_name) | |
|
73 | for cs in changesets[:self.feed_nr]: | |
|
76 | 74 | feed.add_item(title=cs.message, |
|
77 |
link=url('changeset_home', repo_name=repo_name, |
|
|
75 | link=url('changeset_home', repo_name=repo_name, | |
|
76 | revision=cs.raw_id, qualified=True), | |
|
78 | 77 | description=str(cs.date)) |
|
79 | 78 | |
|
80 | 79 | response.content_type = feed.mime_type |
General Comments 0
You need to be logged in to leave comments.
Login now