1. Robot Mirror
  2. bugs.python.org


martin.v.loewis  committed 2001bfc

Add script to fill out issue CC.

  • Participants
  • Parent commits 491a170
  • Branches default

Comments (0)

Files changed (1)

File scripts/updatecc

View file
  • Ignore whitespace
+import sys, os, urllib2, logging, datetime
+basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+import gae2django
+from codereview.models import (Repository, Branch, Patch, 
+                               PatchSet, Issue, Content)
+from django.db import connection, transaction
+c = connection.cursor()
+for issue in Issue.objects.all():
+    c.execute("select _address from _user,issue_nosy where nodeid=%s and id=linkid",
+              (issue.id,))
+    issue.cc = [r[0] for r in c.fetchall()]
+    issue.save()