~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/controllers/atom_ui.py

  • Committer: Robey Pointer
  • Date: 2006-12-23 19:29:05 UTC
  • Revision ID: robey@lag.net-20061223192905-wwzq2hluxta8k5mf
add setup.py info so an sdist tarball can be made

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    @turbogears.expose(template='loggerhead.templates.atom', format="xml", content_type="application/atom+xml")
34
34
    def default(self, *args):
35
35
        h = self._branch.get_history()
36
 
 
37
 
        h._branch.lock_read()
38
 
        try:
39
 
            pagesize = int(self._branch.config.get('pagesize', '20'))
40
 
 
41
 
            revid_list = h.get_file_view(h.last_revid, None)
42
 
            entries = list(h.get_changes(list(revid_list)[:pagesize]))
43
 
 
44
 
            vals = {
45
 
                'branch': self._branch,
46
 
                'changes': entries,
47
 
                'util': util,
48
 
                'history': h,
49
 
                'updated': entries[0].date.isoformat() + 'Z',
50
 
            }
51
 
            h.flush_cache()
52
 
            return vals
53
 
        finally:
54
 
            h._branch.unlock()
 
36
        pagesize = int(self._branch.config.get('pagesize', '20'))
 
37
 
 
38
        revid_list, start_revid = h.get_file_view(None, None)
 
39
        entries = list(h.get_changes(list(revid_list)[:pagesize]))
 
40
 
 
41
        vals = {
 
42
            'external_url': cherrypy.request.base,
 
43
            'branch': self._branch,
 
44
            'changes': entries,
 
45
            'util': util,
 
46
            'history': h,
 
47
            'scan_url': '/changes',
 
48
            'updated': entries[0].date.isoformat() + 'Z',
 
49
        }
 
50
        h.flush_cache()
 
51
        return vals