~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/apps/config.py

  • Committer: Matt Nordhoff
  • Date: 2009-04-29 23:30:35 UTC
  • mfrom: (318.1.2 dozer)
  • Revision ID: mnordhoff@mattnordhoff.com-20090429233035-9kr4cqnmh96bzixd
Use Dozer for memory profiling (Paul Hummer)

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
                friendly_name = history.get_config().get_nickname()
109
109
                if friendly_name is None:
110
110
                    friendly_name = view_name
111
 
            branch_url = self._get_branch_url(view, view_config, view_name)
112
 
            description = self._get_description(view, view_config, history)
113
111
            self.view_data_by_name[view_name] = {
114
112
                'branch_path': folder,
115
 
                'config': view_config,
116
 
                'description': description,
 
113
                'args': (view_name, view_config, self.graph_cache),
 
114
                'description': self._get_description(view,
 
115
                                                     view_config,
 
116
                                                     history),
 
117
                '_src_folder': folder,
 
118
                '_view_config': view_config,
117
119
                'friendly_name': friendly_name,
118
 
                'graph_cache': self.graph_cache,
119
120
                'name': view_name,
120
 
                'served_url': branch_url,
121
121
                }
 
122
            branch_url = self._get_branch_url(view, view_config, view_name)
 
123
            if branch_url is not None:
 
124
                self.view_data_by_name[view_name]['branch_url'] = branch_url
122
125
            self.view_names.append(view_name)
123
126
        finally:
124
127
            b.unlock()
129
132
            return None
130
133
        view_data = view_data.copy()
131
134
        branch_path = view_data.pop('branch_path')
132
 
        description = view_data.pop('description')
133
 
        name = view_data.pop('name')
 
135
        args = view_data.pop('args')
134
136
        b = bzrlib.branch.Branch.open(branch_path)
135
137
        b.lock_read()
136
 
        view = BranchWSGIApp(b, **view_data)
137
 
        view.description = description
138
 
        view.name = name
 
138
        view = BranchWSGIApp(b, *args)
 
139
        for k in view_data:
 
140
            setattr(view, k, view_data[k])
139
141
        return view
140
142
 
141
143
    def call(self, environ, start_response):