Source

bugs.python.org / detectors / statusauditor.py

Diff from to

File detectors/statusauditor.py

 def init_status(db, cl, nodeid, newvalues):
-    """ Make sure the status is set on new bugs"""
+    """ Make sure the status is set on new issues"""
 
     if newvalues.has_key('status') and newvalues['status']:
         return
 
     # format the info
     u = db.config.TRACKER_WEB
-    s = ', '.join(['<a href="%sbug%s">%s</a>'%(u,id,id) for id in dependencies])
+    s = ', '.join(['<a href="%sissue%s">%s</a>'%(u,id,id) for id in dependencies])
     if len(dependencies) == 1:
-        s = 'bug %s is'%s
+        s = 'issue %s is'%s
     else:
-        s = 'bugs %s are'%s
+        s = 'issues %s are'%s
 
     # ok, see if we're trying to resolve
     if newvalues.get('status') and newvalues['status'] == db.status.lookup('closed'):
-        raise ValueError, "This bug can't be closed until %s closed."%s
+        raise ValueError, "This issue can't be closed until %s closed."%s
 
 
 def resolve(db, cl, nodeid, newvalues):
     # Make sure resolution and superseder get only set when status->close
     if not status_change or not status_close:
         if newvalues.get('resolution') or newvalues.get('superseder'):
-            raise ValueError, "resolution and superseder must only be set when a bug is closed"
+            raise ValueError, "resolution and superseder must only be set when a issue is closed"
 
     # Make sure resolution is set when status->close
     if status_close:
         if not newvalues.get('resolution'):
-            raise ValueError, "resolution must be set when a bug is closed"
+            raise ValueError, "resolution must be set when a issue is closed"
 
         # Make sure superseder is set when resolution->duplicate
         if newvalues['resolution'] == db.resolution.lookup('duplicate'):
             if not newvalues.get('superseder'):
-                raise ValueError, "please provide a superseder when closing a bug as 'duplicate'"
+                raise ValueError, "please provide a superseder when closing a issue as 'duplicate'"
 
 
 
 
     # yes - find all the dependend issues, if any, and remove me from
     # their dependency list
-    bugs = cl.find(dependencies=nodeid)
-    for bugid in bugs:
-        dependencies = cl.get(bugid, 'dependencies')
+    issues = cl.find(dependencies=nodeid)
+    for issueid in issues:
+        dependencies = cl.get(issueid, 'dependencies')
         if nodeid in dependencies:
             dependencies.remove(nodeid)
-            cl.set(bugid, dependencies=dependencies)
+            cl.set(issueid, dependencies=dependencies)
 
 
 def init(db):
     # fire before changes are made
-    db.bug.audit('create', init_status)
-    db.bug.audit('create', block_resolution)
-    db.bug.audit('set', block_resolution)
-    db.bug.audit('set', resolve)
+    db.issue.audit('create', init_status)
+    db.issue.audit('create', block_resolution)
+    db.issue.audit('set', block_resolution)
+    db.issue.audit('set', resolve)
 
     # adjust after changes are committed
-    db.bug.react('set', resolve_dependencies)
+    db.issue.react('set', resolve_dependencies)