mercurial/bundle2.py
changeset 24641 60fecc5b14a4
parent 24640 685639f9430d
child 24642 54e5c239c2d9
equal deleted inserted replaced
24640:685639f9430d 24641:60fecc5b14a4
   518 
   518 
   519     def close(self):
   519     def close(self):
   520         """close underlying file"""
   520         """close underlying file"""
   521         if util.safehasattr(self._fp, 'close'):
   521         if util.safehasattr(self._fp, 'close'):
   522             return self._fp.close()
   522             return self._fp.close()
       
   523 
       
   524 def getunbundler(ui, fp, header=None):
       
   525     """return a valid unbundler object for a given header"""
       
   526     return unbundle20(ui, fp, header)
   523 
   527 
   524 class unbundle20(unpackermixin):
   528 class unbundle20(unpackermixin):
   525     """interpret a bundle2 stream
   529     """interpret a bundle2 stream
   526 
   530 
   527     This class is fed with a binary stream and yields parts through its
   531     This class is fed with a binary stream and yields parts through its