103
103
os.rename(conf.svn_conf + ".new", conf.svn_conf)
104
104
chown_to_webserver(conf.svn_conf)
106
def rebuild_svn_group_config():
107
"""Build the complete SVN configuration file for groups
110
groups = conn.get_all('project_group',
111
['groupid', 'groupnm', 'projectsetid'])
112
f = open(conf.svn_group_conf + ".new", "w")
113
f.write("# IVLE SVN Group Repositories Configuration\n")
114
f.write("# Auto-generated on %s\n" % time.asctime())
117
projectsetid = g['projectsetid']
118
offeringinfo = conn.get_offering_info(projectsetid)
119
subj_short_name = offeringinfo['subj_short_name']
120
year = offeringinfo['year']
121
semester = offeringinfo['semester']
122
reponame = "_".join([subj_short_name, year, semester, g['groupnm']])
123
f.write("[%s:/]\n"%reponame)
124
users = conn.get_projectgroup_members(g['groupid'])
126
f.write("%s = rw\n"%u['login'])
129
os.rename(conf.svn_group_conf + ".new", conf.svn_group_conf)
130
chown_to_webserver(conf.svn_group_conf)
106
132
def make_svn_auth(login, throw_on_error=True):
107
133
"""Setup svn authentication for the given user.
108
134
FIXME: create local.auth entry