# HG changeset patch # User Marcin Kuzminski # Date 2016-12-05 07:51:09 # Node ID dcb043bee718da4563ae4458da0310079dcea9fd # Parent 36ec6f9eaae90fba16a4a5258005f91292879644 error-handlig: pass in Abort exception info to RhodeCode from vcsserver. diff --git a/vcsserver/git.py b/vcsserver/git.py --- a/vcsserver/git.py +++ b/vcsserver/git.py @@ -346,10 +346,11 @@ class GitRemote(object): try: remote_refs = client.fetch( path=url, target=repo, determine_wants=determine_wants) - except NotGitRepository: + except NotGitRepository as e: log.warning( 'Trying to fetch from "%s" failed, not a Git repository.', url) - raise exceptions.AbortException() + # Exception can contain unicode which we convert + raise exceptions.AbortException(repr(e)) # mikhail: client.fetch() returns all the remote refs, but fetches only # refs filtered by `determine_wants` function. We need to filter result diff --git a/vcsserver/hg.py b/vcsserver/hg.py --- a/vcsserver/hg.py +++ b/vcsserver/hg.py @@ -607,9 +607,10 @@ class HgRemote(object): date = (tag_time, tag_timezone) try: repo.tag(name, node, message, local, user, date) - except Abort: + except Abort as e: log.exception("Tag operation aborted") - raise exceptions.AbortException() + # Exception can contain unicode which we convert + raise exceptions.AbortException(repr(e)) @reraise_safe_exceptions def tags(self, wire):