Part of bzrlib.views View In Hierarchy
Views are stored in terms of paths relative to the tree root.
The top line of the control file is a format marker in the format:
Bazaar views format X
where X is an integer number. After this top line, version 1 format is stored as follows:
optional name-values pairs in the format 'name=value'
optional view definitions, one per line in the format
views: name file1 file2 ... name file1 file2 ...
where the fields are separated by a nul character (). The views file is encoded in utf-8. The only supported keyword in version 1 is 'current' which stores the name of the current view, if any.
Method | __init__ | Undocumented |
Method | supports_views | Undocumented |
Method | get_view_info | Get the current view and dictionary of views. |
Method | set_view_info | Set the current view and dictionary of views. |
Method | lookup_view | Return the contents of a view. |
Method | set_view | Add or update a view definition. |
Method | delete_view | Delete a view definition. |
Method | _save_view_info | Save the current view and all view definitions. |
Method | _load_view_info | Load the current view and dictionary of view definitions. |
Method | _serialize_view_content | Convert view keywords and a view dictionary into a stream. |
Method | _deserialize_view_content | Convert a stream into view keywords and a dictionary of views. |
Returns | current, views where current = the name of the current view or None if no view is enabled views = a map from view name to list of files/directories |
Parameters | current | the name of the current view or None if no view is enabled |
views | a map from view name to list of files/directories |
Parameters | view_Name | name of the view or None to lookup the current view |
Returns | the list of files/directories in the requested view |
Parameters | view_name | the name of the view |
view_files | the list of files/directories in the view | |
make_current | make this view the current one or not |
If the view deleted is the current one, the current view is reset.
Be sure to have initialised self._current and self._views before calling this method.