diff mercurial/error.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 3c224e0949de
children 7568f5c1c801
line wrap: on
line diff
--- a/mercurial/error.py	Mon Apr 21 16:02:03 2014 -0700
+++ b/mercurial/error.py	Mon Apr 21 18:59:09 2014 -0700
@@ -94,3 +94,7 @@
 
 class SignatureError(Exception):
     pass
+
+class PushRaced(RuntimeError):
+    """An exception raised during unbundling that indicate a push race"""
+