summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2015-01-11 00:59:09 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2015-01-11 01:06:35 +0100
commitcb661cd971b7a219c33e24875d23afafc6a48334 (patch)
tree0e1f46ec0bb4962c690b9700ebcdac2ae89fcb0f
parent85b48ceb121ef33ff1114cb1a8b78c197399f92b (diff)
downloadaur-cb661cd971b7a219c33e24875d23afafc6a48334.tar.gz
aur-cb661cd971b7a219c33e24875d23afafc6a48334.tar.xz
Add to notification list on repository creation
Since commit bf7717a (git-serve.py: Adopt repositories on creation, 2015-01-06), newly created package bases are no longer orphan and therefore, they are not adopted when pushing the first commit which also means that the initial submitter is not added to the notification list automatically. To remedy this, add the owner to the notification list when setting up a new repository. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rwxr-xr-xscripts/git-integration/git-serve.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/git-integration/git-serve.py b/scripts/git-integration/git-serve.py
index 227e37b9..6f4d4f95 100755
--- a/scripts/git-integration/git-serve.py
+++ b/scripts/git-integration/git-serve.py
@@ -78,6 +78,10 @@ def setup_repo(repo, user):
cur.execute("INSERT INTO PackageBases (Name, SubmittedTS, ModifiedTS, " +
"SubmitterUID, MaintainerUID) VALUES (%s, UNIX_TIMESTAMP(), " +
"UNIX_TIMESTAMP(), %s, %s)", [repo, userid, userid])
+ pkgbase_id = cur.lastrowid
+
+ cur.execute("INSERT INTO CommentNotify (PackageBaseID, UserID) " +
+ "VALUES (%s, %s)", [pkgbase_id, userid])
db.commit()
db.close()