diff 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
line wrap: on
line diff
--- a/mercurial/wireproto.py	Mon Apr 21 16:02:03 2014 -0700
+++ b/mercurial/wireproto.py	Mon Apr 21 18:59:09 2014 -0700
@@ -826,5 +826,5 @@
         else:
             sys.stderr.write("abort: %s\n" % inst)
             return pushres(0)
-    except exchange.PushRaced, exc:
+    except error.PushRaced, exc:
         return pusherr(str(exc))