Skip to content

Commit

Permalink
Merge branch 'git-fixes' of git://github.com/cdavis5x/buildbot
Browse files Browse the repository at this point in the history
* 'git-fixes' of git://github.com/cdavis5x/buildbot:
  buildslave/git: Don't fail the whole build if git branch -M can't rename master.
  • Loading branch information
djmitche committed Oct 9, 2011
2 parents 300fbcf + 38525c1 commit 6f5ce3b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions slave/buildslave/commands/git.py
Expand Up @@ -63,7 +63,7 @@ def _fullSrcdir(self):
def sourcedirIsUpdateable(self):
return os.path.isdir(os.path.join(self._fullSrcdir(), ".git"))

def _dovccmd(self, command, cb=None, **kwargs):
def _dovccmd(self, command, cb=None, stopOnFail=True, **kwargs):
git = self.getCommand("git")
c = runprocess.RunProcess(self.builder, [git] + command, self._fullSrcdir(),
sendRC=False, timeout=self.timeout,
Expand All @@ -72,7 +72,8 @@ def _dovccmd(self, command, cb=None, **kwargs):
self.command = c
d = c.start()
if cb:
d.addCallback(self._abandonOnFailure)
if stopOnFail:
d.addCallback(self._abandonOnFailure)
d.addCallback(cb)
return d

Expand Down Expand Up @@ -107,7 +108,7 @@ def _didHeadCheckout(self, res):
# Rename branch, so that the repo will have the expected branch name
# For further information about this, see the commit message
command = ['branch', '-M', self.branch]
return self._dovccmd(command, self._initSubmodules)
return self._dovccmd(command, self._initSubmodules, False)

def _didFetch(self, res):
if self.revision:
Expand Down

0 comments on commit 6f5ce3b

Please sign in to comment.