def dumprepos(self):
# FIXME: use a trigger to indicate if *anything at all* has changed
curs = self.db.cursor()
- curs.execute("SELECT name,anonymous,web FROM repositories WHERE approved ORDER BY name")
+ curs.execute("SELECT name,anonymous,web,(SELECT min(first_name) FROM repository_permissions AS rp LEFT JOIN auth_user AS au ON au.username=rp.userid WHERE rp.level=2 AND rp.repository=r.repoid) FROM repositories AS r WHERE approved ORDER BY name")
f = open("%s.tmp" % self.conf.get("paths", "gitweblist"), "w")
- for name, anon, web in curs:
+ for name, anon, web, owner in curs:
# Check if this repository exists at all
if not os.path.isdir("%s/repos/%s" % (self.conf.get("paths", "githome"), name)):
# Does not exist, let's initialize a new one
# Check for publishing options here
if web:
- f.write("%s\n" % (urllib.quote_plus(name)))
+ f.write("%s %s\n" % (urllib.quote_plus(name), urllib.quote_plus(owner)))
anonfile = "%s/repos/%s/git-daemon-export-ok" % (self.conf.get("paths", "githome"), name)
if anon:
if not os.path.isfile(anonfile):