Comments
Patch
@@ -728,11 +728,12 @@ def handlechangegroup(op, inpart):
while len(h) == 20:
heads.append(h)
h = inpart.read(20)
assert not h
if heads != op.repo.heads():
- raise error.PushRaced()
+ raise error.PushRaced('repository changed while pushing - '
+ 'please try again')
@parthandler('b2x:output')
def handleoutput(op, inpart):
"""forward output captured on the server to the client"""
for line in inpart.read().splitlines():
@@ -137,11 +137,11 @@ Create an extension to test bundle2 API
> op = bundle2.processbundle(repo, unbundler, lambda: tr)
> tr.close()
> except KeyError, exc:
> raise util.Abort('missing support for %s' % exc)
> except error.PushRaced, exc:
- > raise util.Abort('push race')
+ > raise util.Abort('push race: %s' % exc)
> finally:
> if tr is not None:
> tr.release()
> lock.release()
> remains = sys.stdin.read()
@@ -613,11 +613,11 @@ Test push race detection
$ hg bundle2 --pushrace ../part-race.hg2
$ hg unbundle2 < ../part-race.hg2
0 unread bytes
- abort: push race
+ abort: push race: repository changed while pushing - please try again
[255]
Support for changegroup
===================================