/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/views.py

Use new context stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
    def _load_view_info(self):
208
208
        """Load the current view and dictionary of view definitions."""
209
209
        if not self._loaded:
210
 
            self.tree.lock_read()
211
 
            try:
 
210
            with self.tree.lock_read():
212
211
                try:
213
212
                    view_content = self.tree._transport.get_bytes('views')
214
213
                except errors.NoSuchFile as e:
217
216
                    keywords, self._views = \
218
217
                        self._deserialize_view_content(view_content)
219
218
                    self._current = keywords.get('current')
220
 
            finally:
221
 
                self.tree.unlock()
222
219
            self._loaded = True
223
220
 
224
221
    def _serialize_view_content(self, keywords, view_dict):