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
bug_from_uuid
clear_cached_setting
count
extend
has_bug
index
insert
load_all_bugs
load_settings
new_bug
pop
remove
remove_bug
reverse
save
save_settings
sibling_uuids
sort
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 0x9200e64>.

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)
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()
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
bug_from_uuid
changed
clear_cached_setting
count
extend
has_bug
index
insert
load_all_bugs
load_settings
new_bug
pop
remove
remove_bug
reverse
save
save_settings
sibling_uuids
sort
uuids
changed()

This Page