bd = bugdir.BugDir(from_disk=True,
manipulate_encodings=False)
bugs = []
- for uuid in bd.list_uuids():
+ for uuid in bd.uuids():
if uuid.startswith(partial):
bug = bd.bug_from_uuid(uuid)
if bug.active == True:
bd = bugdir.BugDir(from_disk=True,
manipulate_encodings=manipulate_encodings)
if options.list:
- ts = set([bd.bug_from_uuid(bug).target for bug in bd.list_uuids()])
+ ts = set([bd.bug_from_uuid(bug).target for bug in bd.uuids()])
for target in sorted(ts):
if target and isinstance(target,str):
print target
map = {}
for bug in self:
map[bug.uuid] = bug
- for uuid in self.list_uuids():
+ for uuid in self.uuids():
if uuid not in map:
map[uuid] = None
self._bug_map_value = map # ._bug_map_value used by @local_property
if self.sync_with_disk == False:
raise DiskAccessRequired("load all bugs")
self._clear_bugs()
- for uuid in self.list_uuids():
+ for uuid in self.uuids():
self._load_bug(uuid)
def save(self):
# methods for managing bugs
- def list_uuids(self):
+ def uuids(self):
uuids = []
if self.sync_with_disk == True and os.path.exists(self.get_path()):
# list the uuids on disk
"""
For testing. Set sync_with_disk==False for a memory-only bugdir.
>>> bugdir = SimpleBugDir()
- >>> uuids = list(bugdir.list_uuids())
+ >>> uuids = list(bugdir.uuids())
>>> uuids.sort()
>>> print uuids
['a', 'b']
self.bugdir.new_bug(uuid="c", summary="Praying mantis")
length = len(self.bugdir)
self.failUnless(length == 3, "%d != 3 bugs" % length)
- uuids = list(self.bugdir.list_uuids())
+ uuids = list(self.bugdir.uuids())
self.failUnless(len(uuids) == 3, "%d != 3 uuids" % len(uuids))
self.failUnless(uuids == ["a","b","c"], str(uuids))
bugA = self.bugdir.bug_from_uuid("a")
added = []
removed = []
modified = []
- for uuid in self.new_bugdir.list_uuids():
+ for uuid in self.new_bugdir.uuids():
new_bug = self.new_bugdir.bug_from_uuid(uuid)
try:
old_bug = self.old_bugdir.bug_from_uuid(uuid)
new_bug.load_comments()
if old_bug != new_bug:
modified.append((old_bug, new_bug))
- for uuid in self.old_bugdir.list_uuids():
+ for uuid in self.old_bugdir.uuids():
if not self.new_bugdir.has_bug(uuid):
old_bug = self.old_bugdir.bug_from_uuid(uuid)
removed.append(old_bug)