Skip to content

Commit

Permalink
P4: Use tools provided by CompositeStepMixin.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomprince committed Jun 19, 2013
1 parent b3c474c commit f838d86
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions master/buildbot/steps/source/p4.py
Expand Up @@ -98,7 +98,7 @@ def startVC(self, branch, revision, patch):

self.revision = revision
self.method = self._getMethod()
self.stdio_log = self.addLog("stdio")
self.stdio_log = self.addLogForRemoteCommands("stdio")

d = self.checkP4()

Expand Down Expand Up @@ -130,10 +130,7 @@ def full(self, _):
yield self._dovccmd(['sync', '#none'])

# Then remove directory.
# NOTE: Not using CompositeStepMixin's runRmdir() as it requires self.rc_log
# to be defined and ran into issues where setting that in _dovccmd would
# yield multiple logs named 'stdio' in the waterfall report..
yield self._rmdir(self.workdir)
cmd = yield self.runRmdir(self.workdir)

# Then we need to sync the client
if self.revision:
Expand Down Expand Up @@ -355,13 +352,3 @@ def computeSourceRevision(self, changes):
return None
lastChange = max([int(c.revision) for c in changes])
return lastChange

@defer.inlineCallbacks
def _rmdir(self, dir):
cmd = buildstep.RemoteCommand('rmdir',
{'dir': dir,
'logEnviron': self.logEnviron})
cmd.useLog(self.stdio_log, False)
yield self.runCommand(cmd)
if cmd.rc != 0:
raise buildstep.BuildStepFailed()

0 comments on commit f838d86

Please sign in to comment.