aboutsummaryrefslogtreecommitdiffstats
path: root/libbe
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2008-11-19 07:57:57 -0500
committerW. Trevor King <wking@drexel.edu>2008-11-19 07:57:57 -0500
commit35b7aaa33c1826d7b39dc8a0f32100f5c0c5788d (patch)
tree66d70e054b4997ff1debb124e07b872df6f7afe3 /libbe
parent4c4f80d65e778544554ff0c9faebcf9ccff43614 (diff)
downloadbugseverywhere-35b7aaa33c1826d7b39dc8a0f32100f5c0c5788d.tar.gz
Moved bug.new_bug code into bugdir.BugDir.new_bug.
Also removed explicit comparisons from beweb/controllers.py, since they are now built into the Bug.__cmp__ method.
Diffstat (limited to 'libbe')
-rw-r--r--libbe/bug.py8
-rw-r--r--libbe/bugdir.py4
2 files changed, 4 insertions, 8 deletions
diff --git a/libbe/bug.py b/libbe/bug.py
index a14f7fd..4cb53c2 100644
--- a/libbe/bug.py
+++ b/libbe/bug.py
@@ -216,14 +216,6 @@ class Bug(object):
comments.sort(cmp_time)
return comments
-def new_bug(dir, uuid=None):
- bug = dir.new_bug(uuid)
- bug.creator = bug.rcs.get_user_id()
- bug.severity = "minor"
- bug.status = "open"
- bug.time = time.time()
- return bug
-
def new_comment(bug, body=None):
comm = bug.new_comment()
comm.From = comm.rcs.get_user_id()
diff --git a/libbe/bugdir.py b/libbe/bugdir.py
index cf8cba5..41f0fec 100644
--- a/libbe/bugdir.py
+++ b/libbe/bugdir.py
@@ -195,6 +195,10 @@ class BugDir:
self.rcs.mkdir(path)
bug = Bug(self.bugs_path, None, self.rcs, self)
bug.uuid = uuid
+ bug.creator = self.rcs.get_user_id()
+ bug.severity = "minor"
+ bug.status = "open"
+ bug.time = time.time()
return bug
class InvalidValue(ValueError):