--- a/mercurial/error.py Wed May 28 14:22:24 2014 -0700
+++ b/mercurial/error.py Wed May 28 15:31:05 2014 -0700
@@ -98,3 +98,14 @@
class PushRaced(RuntimeError):
"""An exception raised during unbundling that indicate a push race"""
+# bundle2 related errors
+class BundleValueError(ValueError):
+ """error raised when bundle2 cannot be processed
+
+ Current main usecase is unsupported part types."""
+ pass
+
+class ReadOnlyPartError(RuntimeError):
+ """error raised when code tries to alter a part being generated"""
+ pass
+