comparison mercurial/wireproto.py @ 33225:90a1b62bdc91

configitems: register the 'server.preferuncompressed' config
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 30 Jun 2017 03:44:12 +0200
parents ab9121fda8d2
children 0407a51b9d8c
comparison
equal deleted inserted replaced
33224:ab9121fda8d2 33225:90a1b62bdc91
753 command without any other action needed. 753 command without any other action needed.
754 """ 754 """
755 # copy to prevent modification of the global list 755 # copy to prevent modification of the global list
756 caps = list(wireprotocaps) 756 caps = list(wireprotocaps)
757 if streamclone.allowservergeneration(repo): 757 if streamclone.allowservergeneration(repo):
758 if repo.ui.configbool('server', 'preferuncompressed', False): 758 if repo.ui.configbool('server', 'preferuncompressed'):
759 caps.append('stream-preferred') 759 caps.append('stream-preferred')
760 requiredformats = repo.requirements & repo.supportedformats 760 requiredformats = repo.requirements & repo.supportedformats
761 # if our local revlogs are just revlogv1, add 'stream' cap 761 # if our local revlogs are just revlogv1, add 'stream' cap
762 if not requiredformats - {'revlogv1'}: 762 if not requiredformats - {'revlogv1'}:
763 caps.append('stream') 763 caps.append('stream')