Fix crash when there are no local changes.

Fixes a crash that occur if there are no local changes not present
in the upstream branch.

Change-Id: I0361865f144ce33a5a86f7d789a98639524fb0b2
JIRA: CICD-1041
This commit is contained in:
Davide Guerri
2013-12-06 15:49:00 +00:00
parent b02a05625e
commit accda7a772

View File

@@ -258,6 +258,10 @@ class ImportUpstream(LogDedentMixin, GitMixin):
"""Apply list of commits given onto latest import of upstream"""
commit_list = list(strategy.filtered_iter())
if len(commit_list) == 0:
self.log.notice("There are no local changes to be applied!")
return False
self.log.debug(
"""\
Should apply the following list of commits