comparison mercurial/localrepo.py @ 21070:408877d491fb

bundle2: feed a binary stream to `peer.unbundle` This input will have to travel over the wire anyway, so we feed the peer method with a simple binary stream and rely on the server side to use `readbundle` to create the python object. The test output changes because the bundle is created marginally sooner and the debug output interleaves in a different way.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 15 Apr 2014 16:42:52 -0400
parents c15b66a6bbb4
children 19b9f23a8c6f
comparison
equal deleted inserted replaced
21069:0a9cae236738 21070:408877d491fb
121 def unbundle(self, cg, heads, url): 121 def unbundle(self, cg, heads, url):
122 """apply a bundle on a repo 122 """apply a bundle on a repo
123 123
124 This function handles the repo locking itself.""" 124 This function handles the repo locking itself."""
125 try: 125 try:
126 cg = exchange.readbundle(self.ui, cg, None)
126 return exchange.unbundle(self._repo, cg, heads, 'push', url) 127 return exchange.unbundle(self._repo, cg, heads, 'push', url)
127 except exchange.PushRaced, exc: 128 except exchange.PushRaced, exc:
128 raise error.ResponseError(_('push failed:'), exc.message) 129 raise error.ResponseError(_('push failed:'), exc.message)
129 130
130 def lock(self): 131 def lock(self):