comparison mercurial/wireproto.py @ 21063:7ca4f2049d3b

bundle2: move `readbundle` into the `exchange` module The `readbundle` function is going to understand the bundle2 header. We move the function to a more suitable place before making any other changes.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 14 Apr 2014 15:33:50 -0400
parents 7731a2281cf0
children 4d9d490d7bbe
comparison
equal deleted inserted replaced
21062:e7c0a65a5c9c 21063:7ca4f2049d3b
764 fp = os.fdopen(fd, 'wb+') 764 fp = os.fdopen(fd, 'wb+')
765 r = 0 765 r = 0
766 try: 766 try:
767 proto.getfile(fp) 767 proto.getfile(fp)
768 fp.seek(0) 768 fp.seek(0)
769 gen = changegroupmod.readbundle(fp, None) 769 gen = exchange.readbundle(fp, None)
770 r = exchange.unbundle(repo, gen, their_heads, 'serve', 770 r = exchange.unbundle(repo, gen, their_heads, 'serve',
771 proto._client()) 771 proto._client())
772 return pushres(r) 772 return pushres(r)
773 773
774 finally: 774 finally: