D3332: httppeer: handle error response from client reactor
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Fri Apr 13 21:37:00 UTC 2018
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
With this in place, we're now seeing useful errors when running
tests with the new wire protocol enabled!
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3332
AFFECTED FILES
mercurial/httppeer.py
CHANGE DETAILS
diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -763,6 +763,14 @@
f.set_result(result)
del results[request.requestid]
+ elif action == 'error':
+ e = error.RepoError(meta['message'])
+
+ if f:
+ f.set_exception(e)
+ else:
+ raise e
+
else:
e = error.ProgrammingError('unhandled action: %s' % action)
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list