comparison mercurial/bundle2.py @ 21062:e7c0a65a5c9c

bundle2: use headerless HG10UN stream in changegroup Using `readbundle` in the part handlers creates a circular import hell. We are now using a simple `HG10UN` stream with no header. Some parameters may later be introduced on the part to change parameter. Producers are updated as well.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 14 Apr 2014 14:46:32 -0400
parents 0bea9db7543b
children 5ecfe76d0d96
comparison
equal deleted inserted replaced
21061:62d35f251c60 21062:e7c0a65a5c9c
637 # 637 #
638 # The addchangegroup function will get a transaction object by itself, but 638 # The addchangegroup function will get a transaction object by itself, but
639 # we need to make sure we trigger the creation of a transaction object used 639 # we need to make sure we trigger the creation of a transaction object used
640 # for the whole processing scope. 640 # for the whole processing scope.
641 op.gettransaction() 641 op.gettransaction()
642 cg = changegroup.readbundle(inpart, 'bundle2part') 642 cg = changegroup.unbundle10(inpart, 'UN')
643 ret = changegroup.addchangegroup(op.repo, cg, 'bundle2', 'bundle2') 643 ret = changegroup.addchangegroup(op.repo, cg, 'bundle2', 'bundle2')
644 op.records.add('changegroup', {'return': ret}) 644 op.records.add('changegroup', {'return': ret})
645 if op.reply is not None: 645 if op.reply is not None:
646 # This is definitly not the final form of this 646 # This is definitly not the final form of this
647 # return. But one need to start somewhere. 647 # return. But one need to start somewhere.