Skip to content

Commit

Permalink
Partially convert p4 to use attribute group for 'mode'
Browse files Browse the repository at this point in the history
The check if self.mode is in possible_modes can be changed but there's
also a check if it's a renderable. That's different from everything else
so I am skipping it until the history is better understood.
  • Loading branch information
seankelly committed Mar 3, 2015
1 parent ebd96d8 commit 069991a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions master/buildbot/steps/source/p4.py
Expand Up @@ -122,18 +122,15 @@ def checkInstall(p4Installed):
if self.use_tickets and self.p4passwd:
d.addCallback(self._acquireTicket)

if self.mode == 'full':
d.addCallback(self.full)
elif self.mode == 'incremental':
d.addCallback(self.incremental)
d.addCallback(self._getAttrGroupMember('mode', self.mode))

d.addCallback(self.parseGotRevision)
d.addCallback(self.finish)
d.addErrback(self.failed)
return d

@defer.inlineCallbacks
def full(self, _):
def mode_full(self, _):
if debug_logging:
log.msg("P4:full()..")

Expand All @@ -160,7 +157,7 @@ def full(self, _):
log.msg("P4: full() sync done.")

@defer.inlineCallbacks
def incremental(self, _):
def mode_incremental(self, _):
if debug_logging:
log.msg("P4:incremental()")

Expand Down

0 comments on commit 069991a

Please sign in to comment.