/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

  • Committer: Jelmer Vernooij
  • Date: 2019-06-02 02:35:46 UTC
  • mfrom: (7309 work)
  • mto: This revision was merged to the branch mainline in revision 7319.
  • Revision ID: jelmer@jelmer.uk-20190602023546-lqco868tnv26d8ow
merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
189
189
                keywords = {}
190
190
            else:
191
191
                keywords = {'current': self._current}
192
 
            self.tree._transport.put_bytes('views',
193
 
                self._serialize_view_content(keywords, self._views))
 
192
            self.tree._transport.put_bytes(
 
193
                'views', self._serialize_view_content(keywords, self._views))
194
194
 
195
195
    def _load_view_info(self):
196
196
        """Load the current view and dictionary of view definitions."""
198
198
            with self.tree.lock_read():
199
199
                try:
200
200
                    view_content = self.tree._transport.get_bytes('views')
201
 
                except errors.NoSuchFile as e:
 
201
                except errors.NoSuchFile:
202
202
                    self._current, self._views = None, {}
203
203
                else:
204
204
                    keywords, self._views = \
252
252
                    keywords[keyword] = value
253
253
                else:
254
254
                    raise ValueError("failed to deserialize views line %s",
255
 
                        text)
 
255
                                     text)
256
256
            return keywords, views
257
257
        except ValueError as e:
258
258
            raise ValueError("failed to deserialize views content %r: %s"
259
 
                % (view_content, e))
 
259
                             % (view_content, e))
260
260
 
261
261
 
262
262
class DisabledViews(_Views):
297
297
    """If a working tree has a view enabled, check the path is within it."""
298
298
    if tree.supports_views():
299
299
        view_files = tree.views.lookup_view()
300
 
        if  view_files and not osutils.is_inside_any(view_files, relpath):
 
300
        if view_files and not osutils.is_inside_any(view_files, relpath):
301
301
            raise FileOutsideView(relpath, view_files)