~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/controllers/inventory_ui.py

  • Committer: Martin Albisetti
  • Date: 2008-10-25 19:19:05 UTC
  • mto: This revision was merged to the branch mainline in revision 233.
  • Revision ID: martin.albisetti@canonical.com-20081025191905-bpehihsizpoo910g
s/h/history/

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
    template_path = 'loggerhead.templates.inventory'
46
46
 
47
 
    def get_values(self, h, revid, path, kwargs, headers):
 
47
    def get_values(self, history, revid, path, kwargs, headers):
48
48
 
49
49
        try:
50
 
            inv = h.get_inventory(revid)
 
50
            inv = history.get_inventory(revid)
51
51
        except:
52
52
            self.log.exception('Exception fetching changes')
53
53
            raise HTTPServerError('Could not fetch changes')
59
59
        # no navbar for revisions
60
60
        navigation = util.Container()
61
61
 
62
 
        change = h.get_changes([ revid ])[0]
 
62
        change = history.get_changes([ revid ])[0]
63
63
        # add parent & merge-point branch-nick info, in case it's useful
64
 
        h.get_branch_nicks([ change ])
 
64
        history.get_branch_nicks([ change ])
65
65
 
66
66
        if path is not None:
67
67
            if not path.startswith('/'):
68
68
                path = '/' + path
69
 
            file_id = h.get_file_id(revid, path)
 
69
            file_id = history.get_file_id(revid, path)
70
70
        else:
71
71
            path = inv.id2path(file_id)
72
72
        
88
88
 
89
89
        if not is_null_rev(revid):
90
90
            try:
91
 
                inv = h.get_inventory(revid)
 
91
                inv = history.get_inventory(revid)
92
92
            except:
93
93
                self.log.exception('Exception fetching changes')
94
94
                raise HTTPServerError('Could not fetch changes')
95
95
 
96
 
            change = h.get_changes([ revid ])[0]
 
96
            change = history.get_changes([ revid ])[0]
97
97
            # add parent & merge-point branch-nick info, in case it's useful
98
 
            h.get_branch_nicks([ change ])
 
98
            history.get_branch_nicks([ change ])
99
99
 
100
100
            # Create breadcrumb trail for the path within the branch
101
101
            branch_breadcrumbs = util.branch_breadcrumbs(path, inv, 'files')
102
 
            filelist = h.get_filelist(inv, file_id, sort_type)
 
102
            filelist = history.get_filelist(inv, file_id, sort_type)
103
103
        else:
104
104
            inv = None
105
105
            file_id = None
121
121
            'path': path,
122
122
            'updir': updir,
123
123
            'filelist': filelist,
124
 
            'history': h,
 
124
            'history': history,
125
125
            'posixpath': posixpath,
126
126
            'navigation': navigation,
127
127
            'url': self._branch.context_url,