130
130
from common import (util, studpath, zip)
133
def get_login(_realm, _username, _may_save):
134
"""Return the subversion credentials for the user."""
135
return (True, conf.login, conf.svn_pass, True)
133
def get_login(_realm, existing_login, _may_save):
134
"""Callback function used by pysvn for authentication.
135
realm, existing_login, _may_save: The 3 arguments passed by pysvn to
137
The following has been determined empirically, not from docs:
138
existing_login will be the name of the user who owns the process on
139
the first attempt, "" on subsequent attempts. We use this fact.
141
# Only provide credentials on the _first_ attempt.
142
# If we're being asked again, then it means the credentials failed for
143
# some reason and we should just fail. (This is not desirable, but it's
144
# better than being asked an infinite number of times).
145
return (existing_login != "", conf.login, conf.svn_pass, True)
137
147
# Make a Subversion client object
138
148
svnclient = pysvn.Client()