~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/controllers/revlog_ui.py

  • Committer: Robey Pointer
  • Date: 2006-12-20 09:29:42 UTC
  • Revision ID: robey@lag.net-20061220092942-4jte8hob9sq1h93y
the big migration of branch-specific data to a BranchView object: actually
not so bad.  now all branch config is in a sub-object.

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
 
        }