Skip to content

Commit

Permalink
slave/repo: dont clobber if cherry-pick fails
Browse files Browse the repository at this point in the history
we rather print the git diff for everything to get a change to find out what does not merge

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
  • Loading branch information
Pierre Tardy authored and djmitche committed Jul 8, 2011
1 parent f591d33 commit abf8b6d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion slave/buildslave/commands/repo.py
Expand Up @@ -139,6 +139,11 @@ def _didSync(self, dummy):

def _doDownload(self, dummy):
if hasattr(self.command, 'stderr') and self.command.stderr:
if "Automatic cherry-pick failed" in self.command.stderr:
command = ['forall','-c' ,'git' ,'diff', 'HEAD']
self.cherry_pick_failed = True
return self._repoCmd(command, self._DownloadAbandon, abandonOnFailure = False, keepStderr=True) # call again

lines = self.command.stderr.split('\n')
if len(lines) > 2:
match1 = self.re_change.match(lines[1])
Expand All @@ -152,7 +157,7 @@ def _doDownload(self, dummy):
command = ['download'] + download.split(' ')
self.sendStatus({"header": "downloading changeset %s\n"
% (download)})
return self._repoCmd(command, self._doDownload, keepStderr=True) # call again
return self._repoCmd(command, self._doDownload, abandonOnFailure = False, keepStderr=True) # call again

if self.repo_downloaded:
self.sendStatus({"repo_downloaded": self.repo_downloaded[:-1]})
Expand All @@ -164,4 +169,9 @@ def maybeNotDoVCFallback(self, res):
if hasattr(self.command, 'stderr'):
if "Couldn't find remote ref" in self.command.stderr:
raise AbandonChain(-1)
if hasattr(self, 'cherry_pick_failed') or "Automatic cherry-pick failed" in self.command.stderr:
raise AbandonChain(-1)
def _DownloadAbandon(self,dummy):
self.sendStatus({"header": "abandonned due to merge failure\n"})
raise AbandonChain(-1)

0 comments on commit abf8b6d

Please sign in to comment.