Patchwork D3332: httppeer: handle error response from client reactor

login
register
mail settings
Submitter phabricator
Date April 13, 2018, 10:21 p.m.
Message ID <8b6b7fd187dee3b09cb129d6e317c156@localhost.localdomain>
Download mbox | patch
Permalink /patch/30935/
State Not Applicable
Headers show

Comments

phabricator - April 13, 2018, 10:21 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8cea0d57bf37: httppeer: handle error response from client reactor (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3332?vs=8155&id=8190

REVISION DETAIL
  https://phab.mercurial-scm.org/D3332

AFFECTED FILES
  mercurial/httppeer.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

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)