mercurial/wireproto.py
changeset 14419 ede7cea1550f
parent 14093 ce99d887585f
child 14436 5adb52524779
equal deleted inserted replaced
14418:0174d1f79280 14419:ede7cea1550f
   137         '''Send cg (a readable file-like object representing the
   137         '''Send cg (a readable file-like object representing the
   138         changegroup to push, typically a chunkbuffer object) to the
   138         changegroup to push, typically a chunkbuffer object) to the
   139         remote server as a bundle. Return an integer indicating the
   139         remote server as a bundle. Return an integer indicating the
   140         result of the push (see localrepository.addchangegroup()).'''
   140         result of the push (see localrepository.addchangegroup()).'''
   141 
   141 
   142         if self.capable('unbundlehash'):
   142         if heads != ['force'] and self.capable('unbundlehash'):
   143             heads = encodelist(['hashed',
   143             heads = encodelist(['hashed',
   144                                 util.sha1(''.join(sorted(heads))).digest()])
   144                                 util.sha1(''.join(sorted(heads))).digest()])
   145         else:
   145         else:
   146             heads = encodelist(heads)
   146             heads = encodelist(heads)
   147 
   147