mercurial/wireproto.py
changeset 15017 f4522df38c65
parent 14970 592e45b7d43e
child 15217 42d0d4f63bf0
--- a/mercurial/wireproto.py	Wed Aug 03 16:41:14 2011 -0500
+++ b/mercurial/wireproto.py	Tue Aug 02 15:21:10 2011 -0400
@@ -335,6 +335,10 @@
     def __init__(self, res):
         self.res = res
 
+class ooberror(object):
+    def __init__(self, message):
+        self.message = message
+
 def dispatch(repo, proto, command):
     func, spec = commands[command]
     args = proto.getargs(spec)
@@ -376,6 +380,8 @@
             result = func(repo, proto, *[data[k] for k in keys])
         else:
             result = func(repo, proto)
+        if isinstance(result, ooberror):
+            return result
         res.append(escapearg(result))
     return ';'.join(res)