b.v.PathBasedViews(_Views) : class documentation

Part of bzrlib.views View In Hierarchy

View storage in an unversioned tree control file.

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:

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.
def __init__(self, tree):
Undocumented
def supports_views(self):
Undocumented
def get_view_info(self):
Get the current view and dictionary of views.
Returnscurrent, 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
def set_view_info(self, current, views):
Set the current view and dictionary of views.
Parameterscurrentthe name of the current view or None if no view is enabled
viewsa map from view name to list of files/directories
def lookup_view(self, view_name=None):
Return the contents of a view.
Parametersview_Namename of the view or None to lookup the current view
Returnsthe list of files/directories in the requested view
def set_view(self, view_name, view_files, make_current=True):
Add or update a view definition.
Parametersview_namethe name of the view
view_filesthe list of files/directories in the view
make_currentmake this view the current one or not
def delete_view(self, view_name):
Delete a view definition.

If the view deleted is the current one, the current view is reset.

def _save_view_info(self):
Save the current view and all view definitions.

Be sure to have initialised self._current and self._views before calling this method.

def _load_view_info(self):
Load the current view and dictionary of view definitions.
def _serialize_view_content(self, keywords, view_dict):
Convert view keywords and a view dictionary into a stream.
def _deserialize_view_content(self, view_content):
Convert a stream into view keywords and a dictionary of views.
API Documentation for Bazaar, generated by pydoctor at 2019-11-19 00:36:45.