105
107
def rebuild_svn_group_config(store):
106
108
"""Build the complete SVN configuration file for groups
109
groups = conn.get_all('project_group',
110
['groupid', 'groupnm', 'projectsetid'])
111
110
f = open(ivle.conf.svn_group_conf + ".new", "w")
112
111
f.write("# IVLE SVN Group Repositories Configuration\n")
113
112
f.write("# Auto-generated on %s\n" % time.asctime())
116
projectsetid = g['projectsetid']
117
offeringinfo = conn.get_offering_info(projectsetid)
118
subj_short_name = offeringinfo['subj_short_name']
119
year = offeringinfo['year']
120
semester = offeringinfo['semester']
121
reponame = "_".join([subj_short_name, year, semester, g['groupnm']])
114
for group in store.find(ProjectGroup):
115
offering = group.project_set.offering
116
reponame = "_".join([offering.subject.short_name,
117
offering.semester.year,
118
offering.semester.semester,
122
120
f.write("[%s:/]\n"%reponame)
123
users = conn.get_projectgroup_members(g['groupid'])
125
f.write("%s = rw\n"%u['login'])
121
for user in group.members:
122
f.write("%s = rw\n" % user.login)
128
125
os.rename(ivle.conf.svn_group_conf + ".new", ivle.conf.svn_group_conf)