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'])
else:
raise Exception("Unsupported merge mode: %s" % mode)
except Exception:
# Log exceptions at debug level because they are
except git.GitCommandError:
# Log git exceptions at debug level because they are
# usually benign merge conflicts
self.log.debug("Unable to merge %s" % item, exc_info=True)
return None
except Exception:
self.log.exception("Exception while merging a change:")
return None
return commit