libbe.bugdir

Define the BugDir class for storing a collection of bugs.

class libbe.bugdir.BugDir(storage, uuid=None, from_storage=False)

A BugDir is a container for Bugs, with some additional attributes.

Parameters :

storage : Storage

Storage instance containing the bug directory. If from_storage is False, storage may be None.

uuid : str, optional

Set the bugdir UUID (see libbe.util.id). Useful if you are loading one of several bugdirs stored in a single Storage instance.

from_storage : bool, optional

If True, attempt to load from storage. Otherwise, setup in memory, saving to storage if it is not None.

See also

SimpleBugDir

Methods

append L.append(object) – append object to end
bug_from_uuid(uuid)
clear_cached_setting([setting]) If setting=None, clear all cached settings
count(...)
extend L.extend(iterable) – extend list by appending elements from the iterable
has_bug(bug_uuid)
index((value, [start, ...) Raises ValueError if the value is not present.
insert L.insert(index, object) – insert object before index
load_all_bugs() Warning: this could take a while.
load_settings([settings_mapfile])
new_bug([summary, _uuid])
pop(...) Raises IndexError if list is empty or index is out of range.
remove L.remove(value) – remove first occurrence of value.
remove_bug(bug)
reverse L.reverse() – reverse IN PLACE
save() Save any loaded contents to storage.
save_settings()
sibling_uuids()
sort L.sort(cmp=None, key=None, reverse=False) – stable sort IN PLACE;
uuids([use_cached_disk_uuids])
active_status

The allowed active bug states and their descriptions.

This property defaults to None.

bug_from_uuid(uuid)
extra_strings

Space for an array of extra strings. Useful for storing state for functionality implemented purely in becommands/<some_function>.py.

This property defaults to [].

This property is checked with <function _extra_strings_check_fn at 0x95286bc>.

has_bug(bug_uuid)
inactive_status

The allowed inactive bug states and their descriptions.

This property defaults to None.

load_all_bugs()

Warning: this could take a while.

load_settings(settings_mapfile=None)
new_bug(summary=None, _uuid=None)
remove_bug(bug)
required_saved_properties = []
save()

Save any loaded contents to storage. Because of lazy loading of bugs and comments, this is actually not too inefficient.

However, if self.storage.is_writeable() == True, then any changes are automatically written to storage as soon as they happen, so calling this method will just waste time (unless something else has been messing with your stored files).

save_settings()
settings_properties = ['target', 'severities', 'active_status', 'inactive_status', 'extra_strings']
severities

The allowed bug severities and their descriptions.

This property defaults to None.

sibling_uuids()
target

The current project development target.

This property defaults to None.

uuids(use_cached_disk_uuids=True)
exception libbe.bugdir.NoBugMatches(*args, **kwargs)
class libbe.bugdir.RevisionedBugDir(bugdir, revision)

RevisionedBugDirs are read-only copies used for generating diffs between revisions.

Methods

append L.append(object) – append object to end
bug_from_uuid(uuid)
changed()
clear_cached_setting([setting]) If setting=None, clear all cached settings
count(...)
extend L.extend(iterable) – extend list by appending elements from the iterable
has_bug(bug_uuid)
index((value, [start, ...) Raises ValueError if the value is not present.
insert L.insert(index, object) – insert object before index
load_all_bugs() Warning: this could take a while.
load_settings([settings_mapfile])
new_bug([summary, _uuid])
pop(...) Raises IndexError if list is empty or index is out of range.
remove L.remove(value) – remove first occurrence of value.
remove_bug(bug)
reverse L.reverse() – reverse IN PLACE
save() Save any loaded contents to storage.
save_settings()
sibling_uuids()
sort L.sort(cmp=None, key=None, reverse=False) – stable sort IN PLACE;
uuids([use_cached_disk_uuids])
changed()

This Page