equal
deleted
inserted
replaced
16 from . import ( |
16 from . import ( |
17 error, |
17 error, |
18 util, |
18 util, |
19 ) |
19 ) |
20 from .utils import ( |
20 from .utils import ( |
|
21 compression, |
21 interfaceutil, |
22 interfaceutil, |
22 ) |
23 ) |
23 |
24 |
24 # Names of the SSH protocol implementations. |
25 # Names of the SSH protocol implementations. |
25 SSHV1 = 'ssh-v1' |
26 SSHV1 = 'ssh-v1' |
314 |
315 |
315 return True |
316 return True |
316 |
317 |
317 def supportedcompengines(ui, role): |
318 def supportedcompengines(ui, role): |
318 """Obtain the list of supported compression engines for a request.""" |
319 """Obtain the list of supported compression engines for a request.""" |
319 assert role in (util.CLIENTROLE, util.SERVERROLE) |
320 assert role in (compression.CLIENTROLE, compression.SERVERROLE) |
320 |
321 |
321 compengines = util.compengines.supportedwireengines(role) |
322 compengines = compression.compengines.supportedwireengines(role) |
322 |
323 |
323 # Allow config to override default list and ordering. |
324 # Allow config to override default list and ordering. |
324 if role == util.SERVERROLE: |
325 if role == compression.SERVERROLE: |
325 configengines = ui.configlist('server', 'compressionengines') |
326 configengines = ui.configlist('server', 'compressionengines') |
326 config = 'server.compressionengines' |
327 config = 'server.compressionengines' |
327 else: |
328 else: |
328 # This is currently implemented mainly to facilitate testing. In most |
329 # This is currently implemented mainly to facilitate testing. In most |
329 # cases, the server should be in charge of choosing a compression engine |
330 # cases, the server should be in charge of choosing a compression engine |