comparison mercurial/wireproto.py @ 21184:28d76afa1568 stable

bundle2: fix raising errors during heads checking If the heads on the server differ from the ones reported seen by the client at bundle time, we raise a PushRaced exception. However, the part raising the exception was broken. To fix it, we move the PushRaced class in the error module so it can be accessible everywhere without an import cycle. A test is also added to prevent regression.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 21 Apr 2014 18:59:09 -0700
parents 4345274adc4b
children 9f3652e851f8
comparison
equal deleted inserted replaced
21183:4345274adc4b 21184:28d76afa1568
824 manargs, advargs)) 824 manargs, advargs))
825 return streamres(bundler.getchunks()) 825 return streamres(bundler.getchunks())
826 else: 826 else:
827 sys.stderr.write("abort: %s\n" % inst) 827 sys.stderr.write("abort: %s\n" % inst)
828 return pushres(0) 828 return pushres(0)
829 except exchange.PushRaced, exc: 829 except error.PushRaced, exc:
830 return pusherr(str(exc)) 830 return pusherr(str(exc))