114
115
with open(conf_path , 'w') as conf_file:
115
116
conf_file.write('[general]\nanon-access = write\n')
116
117
self._svnserve = subprocess.Popen(
117
['svnserve', '--daemon', '--foreground', '--root',
118
self.repository_path])
118
['svnserve', '--daemon', '--foreground', '--threads',
119
'--root', self.repository_path])
120
121
for i in range(10):
122
ra = self._get_ra(self.get_url())
123
except subvertpy.SubversionException, e:
124
if 'Connection refused' in str(e):
123
self._get_ra(self.get_url())
125
if e.errno == errno.ECONNREFUSED:
125
126
time.sleep(delay)
132
self._kill_svnserve()
131
133
raise AssertionError(
132
134
"svnserve didn't start accepting connections")
136
def _kill_svnserve(self):
137
os.kill(self._svnserve.pid, signal.SIGINT)
138
self._svnserve.communicate()
134
140
def stop_server(self):
135
141
super(SubversionServer, self).stop_server()
136
142
if self._use_svn_serve:
137
os.kill(self._svnserve.pid, signal.SIGINT)
138
self._svnserve.communicate()
143
self._kill_svnserve()
140
145
def makeBranch(self, branch_name, tree_contents):
141
146
"""Create a branch on the Subversion server called `branch_name`.