##// END OF EJS Templates
http: Remove 'pyro4' default values from function arguemnts in vcs init. #4237
Martin Bornhold -
r959:b3b912d4 default
parent child Browse files
Show More
@@ -126,7 +126,7 b' def connect_http(server_and_port):'
126 connection.Svn = None
126 connection.Svn = None
127
127
128
128
129 def connect_vcs(server_and_port, protocol='pyro4'):
129 def connect_vcs(server_and_port, protocol):
130 """
130 """
131 Initializes the connection to the vcs server.
131 Initializes the connection to the vcs server.
132
132
@@ -141,7 +141,7 b' def connect_vcs(server_and_port, protoco'
141
141
142 # TODO: johbo: This function should be moved into our test suite, there is
142 # TODO: johbo: This function should be moved into our test suite, there is
143 # no reason to support starting the vcsserver in Enterprise itself.
143 # no reason to support starting the vcsserver in Enterprise itself.
144 def start_vcs_server(server_and_port, protocol='pyro4', log_level=None):
144 def start_vcs_server(server_and_port, protocol, log_level=None):
145 """
145 """
146 Starts the vcs server in a subprocess.
146 Starts the vcs server in a subprocess.
147 """
147 """
@@ -153,7 +153,7 b' def start_vcs_server(server_and_port, pr'
153
153
154
154
155 def _start_pyro4_vcs_server(server_and_port, log_level=None):
155 def _start_pyro4_vcs_server(server_and_port, log_level=None):
156 _try_to_shutdown_running_server(server_and_port)
156 _try_to_shutdown_running_server(server_and_port, protocol='pyro4')
157 host, port = server_and_port.rsplit(":", 1)
157 host, port = server_and_port.rsplit(":", 1)
158 host = host.strip('[]')
158 host = host.strip('[]')
159 args = [
159 args = [
@@ -198,8 +198,8 b' def _wait_until_vcs_server_is_reachable('
198 time.sleep(0.5)
198 time.sleep(0.5)
199
199
200
200
201 def _try_to_shutdown_running_server(server_and_port):
201 def _try_to_shutdown_running_server(server_and_port, protocol):
202 server = create_vcsserver_proxy(server_and_port)
202 server = create_vcsserver_proxy(server_and_port, protocol)
203 try:
203 try:
204 server.shutdown()
204 server.shutdown()
205 except (CommunicationError, pycurl.error):
205 except (CommunicationError, pycurl.error):
@@ -207,11 +207,11 b' def _try_to_shutdown_running_server(serv'
207
207
208 # TODO: Not sure why this is important, but without it the following start
208 # TODO: Not sure why this is important, but without it the following start
209 # of the server fails.
209 # of the server fails.
210 server = create_vcsserver_proxy(server_and_port)
210 server = create_vcsserver_proxy(server_and_port, protocol)
211 server.ping()
211 server.ping()
212
212
213
213
214 def create_vcsserver_proxy(server_and_port, protocol='pyro4'):
214 def create_vcsserver_proxy(server_and_port, protocol):
215 if protocol == 'pyro4':
215 if protocol == 'pyro4':
216 return _create_vcsserver_proxy_pyro4(server_and_port)
216 return _create_vcsserver_proxy_pyro4(server_and_port)
217 elif protocol == 'http':
217 elif protocol == 'http':
General Comments 0
You need to be logged in to leave comments. Login now