~ubuntu-branches/ubuntu/lucid/loggerhead/lucid-security

« back to all changes in this revision

Viewing changes to loggerhead/controllers/revlog_ui.py

  • Committer: Bazaar Package Importer
  • Author(s): James Westby, Roland Mas, Jelmer Vernooij, James Westby
  • Date: 2009-08-26 13:18:03 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090826131803-0ce1fhaetci8b0c5
Tags: 1.17-0ubuntu1
[ Roland Mas ]
* Use the YUI library provided by libjs-yui. (Closes: #511286)

[ Jelmer Vernooij ]
* Use my debian.org address in Uploaders field.
* Add ${misc:Depends} to please lintian.
* Suggest recent version of paste, which doesn't expose internal port
  numbers in links. (Closes: #507000)
* Bump standards version to 3.8.1.

[ James Westby ]
* New upstream release.
* Drop get-orig-source rule in favour of debian/watch.
* Add python-pkg-resources and python-paste to Build-Depends,
  python-pkg-resources to Depends and python-simplejson to
  Recommends due to dependency changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import urllib
 
2
 
 
3
from loggerhead import util
 
4
from loggerhead.controllers import TemplatedBranchView
 
5
 
 
6
 
 
7
class RevLogUI(TemplatedBranchView):
 
8
 
 
9
    template_path = 'loggerhead.templates.revlog'
 
10
 
 
11
    def get_values(self, path, kwargs, headers):
 
12
        history = self._history
 
13
 
 
14
        revid = urllib.unquote(self.args[0])
 
15
 
 
16
        change = history.get_changes([revid])[0]
 
17
        file_changes = history.get_file_changes(change)
 
18
        history.add_branch_nicks(change)
 
19
 
 
20
        return {
 
21
            'branch': self._branch,
 
22
            'entry': change,
 
23
            'file_changes': file_changes,
 
24
            'util': util,
 
25
            'revid': revid,
 
26
            'url': self._branch.context_url,
 
27
        }