# HG changeset patch # User Martin Bornhold # Date 2016-08-08 13:01:10 # Node ID eff669b84bf596ba3ef84595239011478a0920f1 # Parent 0e697286258dfdc28963d45d5000c6441e554af2 vcs: Add a flag to the environ to skip the error handling for responses from VCSMiddleware diff --git a/rhodecode/lib/middleware/simplevcs.py b/rhodecode/lib/middleware/simplevcs.py --- a/rhodecode/lib/middleware/simplevcs.py +++ b/rhodecode/lib/middleware/simplevcs.py @@ -352,6 +352,12 @@ class SimpleVCS(object): log.info( '%s action on %s repo "%s" by "%s" from %s', action, self.SCM, str_repo_name, safe_str(username), ip_addr) + + # Set a flag to skip error handling for VCSMiddleware responses. This + # prevents converting error responses to human readable error pages + # which otherwise confuses the command line clients. + environ['rhodecode.vcs.skip_error_handling'] = True + return self._generate_vcs_response( environ, start_response, repo_path, repo_name, extras, action)