mercurial/wireproto.py
changeset 29706 7f6130c7ffe1
parent 29590 84c1a5942f1d
child 29733 bb04f96df51c
equal deleted inserted replaced
29705:41689e293994 29706:7f6130c7ffe1
   397         if any((cap.startswith('HG2') for cap in bundlecaps)):
   397         if any((cap.startswith('HG2') for cap in bundlecaps)):
   398             return bundle2.getunbundler(self.ui, f)
   398             return bundle2.getunbundler(self.ui, f)
   399         else:
   399         else:
   400             return changegroupmod.cg1unpacker(f, 'UN')
   400             return changegroupmod.cg1unpacker(f, 'UN')
   401 
   401 
   402     def unbundle(self, cg, heads, source):
   402     def unbundle(self, cg, heads, url):
   403         '''Send cg (a readable file-like object representing the
   403         '''Send cg (a readable file-like object representing the
   404         changegroup to push, typically a chunkbuffer object) to the
   404         changegroup to push, typically a chunkbuffer object) to the
   405         remote server as a bundle.
   405         remote server as a bundle.
   406 
   406 
   407         When pushing a bundle10 stream, return an integer indicating the
   407         When pushing a bundle10 stream, return an integer indicating the
   408         result of the push (see localrepository.addchangegroup()).
   408         result of the push (see localrepository.addchangegroup()).
   409 
   409 
   410         When pushing a bundle20 stream, return a bundle20 stream.'''
   410         When pushing a bundle20 stream, return a bundle20 stream.
       
   411 
       
   412         `url` is the url the client thinks it's pushing to, which is
       
   413         visible to hooks.
       
   414         '''
   411 
   415 
   412         if heads != ['force'] and self.capable('unbundlehash'):
   416         if heads != ['force'] and self.capable('unbundlehash'):
   413             heads = encodelist(['hashed',
   417             heads = encodelist(['hashed',
   414                                 hashlib.sha1(''.join(sorted(heads))).digest()])
   418                                 hashlib.sha1(''.join(sorted(heads))).digest()])
   415         else:
   419         else: