Merge "Merger: log non Git exceptions on merge"

This commit is contained in:
Jenkins 2014-02-25 19:16:36 +00:00 committed by Gerrit Code Review
commit d2927763d6
1 changed files with 5 additions and 2 deletions

View File

@ -216,11 +216,14 @@ class Merger(object):
commit = repo.cherryPick(item['refspec']) commit = repo.cherryPick(item['refspec'])
else: else:
raise Exception("Unsupported merge mode: %s" % mode) raise Exception("Unsupported merge mode: %s" % mode)
except Exception: except git.GitCommandError:
# Log exceptions at debug level because they are # Log git exceptions at debug level because they are
# usually benign merge conflicts # usually benign merge conflicts
self.log.debug("Unable to merge %s" % item, exc_info=True) self.log.debug("Unable to merge %s" % item, exc_info=True)
return None return None
except Exception:
self.log.exception("Exception while merging a change:")
return None
return commit return commit