1. Robot Mirror
  2. bugs.python.org

Commits

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
+#!/usr/bin/python
+import sys, os, urllib2, logging, datetime
+basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+sys.path.append(basedir+"/rietveld")
+os.environ["DJANGO_SETTINGS_MODULE"]="settings"
+import gae2django
+gae2django.install(server_software='Django')
+
+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()