comparison mercurial/exchange.py @ 20969:7a679918ee2b

localrepo: add unbundle support Localrepo now supports the unbundle method of pushing changegroups. We plan to use the unbundle call for bundle2 so it is important that all peers supports it. The `peer.unbundle` and `peer.addchangegroup` code path have small difference so cause some test output changes. None of those changes seems problematic.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 04 Apr 2014 17:50:44 -0700
parents 33d5fdd9bd99
children 557a083453c9
comparison
equal deleted inserted replaced
20968:33d5fdd9bd99 20969:7a679918ee2b
641 r = 0 641 r = 0
642 lock = repo.lock() 642 lock = repo.lock()
643 try: 643 try:
644 check_heads(repo, heads, 'uploading changes') 644 check_heads(repo, heads, 'uploading changes')
645 # push can proceed 645 # push can proceed
646 try: 646 r = changegroup.addchangegroup(repo, cg, source, url)
647 r = changegroup.addchangegroup(repo, cg, source, url)
648 except util.Abort, inst:
649 # The old code we moved used sys.stderr directly.
650 # We did not changed it to minise code change.
651 # This need to be moved to something proper.
652 # Feel free to do it.
653 sys.stderr.write("abort: %s\n" % inst)
654 finally: 647 finally:
655 lock.release() 648 lock.release()
656 return r 649 return r