17
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
from loggerhead.controllers import TemplatedBranchView
23
class AtomUI (TemplatedBranchView):
25
template_path = 'loggerhead.templates.atom'
27
def get_values(self, path, kwargs, headers):
28
history = self._history
29
pagesize = int(20)#self._branch.config.get('pagesize', '20'))
31
revid_list = history.get_file_view(history.last_revid, None)
32
entries = list(history.get_changes(list(revid_list)[:pagesize]))
34
headers['Content-Type'] = 'application/atom+xml'
22
from loggerhead import util
25
class AtomUI (object):
27
@turbogears.expose(template='loggerhead.templates.atom', format="xml", content_type="application/atom+xml")
28
def default(self, *args):
29
h = util.get_history()
31
# really, there is no point giving a revid here...
36
revlist = h.get_short_revision_history_from(revid)
37
entries = list(h.get_changelist(list(revlist)[:20]))
40
'external_url': util.get_config().get('external_url'),
41
'branch_name': util.get_config().get('branch_name'),
36
42
'changes': entries,
37
'updated': entries[0].utc_date.isoformat(),
38
'history': self._history,
45
'scan_url': '/changes',
46
'updated': entries[0].date.isoformat() + 'Z',