Skip to content

Commit

Permalink
Fix bug introduced in 91bd1d7
Browse files Browse the repository at this point in the history
  • Loading branch information
in3xes committed Jul 13, 2011
1 parent 4f5915a commit ae7fa9d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
15 changes: 9 additions & 6 deletions master/buildbot/steps/source/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,18 @@ def startVC(self, branch, revision, patch):
self.method = self._getMethod()
self.stdio_log = self.addLog("stdio")

gitInstalled = self.checkGit()
if not gitInstalled:
raise BuildSlaveTooOldError("git is not installed on slave")
d = self.checkGit()
def checkInstall(gitInstalled):
if not gitInstalled:
raise BuildSlaveTooOldError("git is not installed on slave")
return 0
d.addCallback(checkInstall)


if self.mode == 'incremental':
d = self.incremental()
d.addCallback(lambda _: self.incremental())
elif self.mode == 'full':
d = self.full()
d.addCallback(lambda _: self.full())
d.addCallback(self.parseGotRevision)
d.addCallback(self.finish)
d.addErrback(self.failed)
Expand Down Expand Up @@ -375,4 +379,3 @@ def check(res):
return False
d.addCallback(check)
return d

12 changes: 7 additions & 5 deletions master/buildbot/steps/source/mercurial.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ def startVC(self, branch, revision, patch):
self.revision = revision
self.method = self._getMethod()
self.stdio_log = self.addLog("stdio")
hgInstalled = self.checkHg()
if not hgInstalled:
raise BuildSlaveTooOldError("Mercurial is not installed on slave")
d = self.checkHg()
def checkInstall(hgInstalled):
if not hgInstalled:
raise BuildSlaveTooOldError("Mercurial is not installed on slave")
return 0

if self.branchType == 'dirname':
assert self.repourl is None
Expand All @@ -117,9 +119,9 @@ def startVC(self, branch, revision, patch):
raise ValueError("Invalid branch type")

if self.mode == 'full':
d = self.full()
d.addCallback(lambda _: self.full())
elif self.mode == 'incremental':
d = self.incremental()
d.addCallback(lambda _: self.incremental())
d.addCallback(self.parseGotRevision)
d.addCallback(self.finish)
d.addErrback(self.failed)
Expand Down

0 comments on commit ae7fa9d

Please sign in to comment.