comparison mercurial/bundle2.py @ 22341:2d16b39601b5

obsmarker: move bundle2caps from the localrepo class to the bundle2 module The localrepo path was quicker, easier, more seductive. We'll soon add a function in another changeset to alter the capabilities.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 25 Aug 2014 19:17:06 +0200
parents 394a17de6a2d
children 262c5cc126c1
comparison
equal deleted inserted replaced
22340:394a17de6a2d 22341:2d16b39601b5
773 data = self._payloadstream.read(size) 773 data = self._payloadstream.read(size)
774 if size is None or len(data) < size: 774 if size is None or len(data) < size:
775 self.consumed = True 775 self.consumed = True
776 return data 776 return data
777 777
778 capabilities = {'HG2X': (),
779 'b2x:listkeys': (),
780 'b2x:pushkey': (),
781 'b2x:changegroup': (),
782 }
783
778 def bundle2caps(remote): 784 def bundle2caps(remote):
779 """return the bundlecapabilities of a peer as dict""" 785 """return the bundlecapabilities of a peer as dict"""
780 raw = remote.capable('bundle2-exp') 786 raw = remote.capable('bundle2-exp')
781 if not raw and raw != '': 787 if not raw and raw != '':
782 return {} 788 return {}