Skip to content

Commit

Permalink
Populate the "project" field of P4Source changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg McNew committed Oct 4, 2011
1 parent 139c4ca commit 1bf500c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions master/CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Gary Poster
Gerald Combs
Gerard Escalante
Geraud Boyer
Greg McNew
Greg Ward
Grig Gheorghiu
Haavard Skinnemoen
Expand Down
12 changes: 9 additions & 3 deletions master/buildbot/changes/p4poller.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Copyright Buildbot Team Members
# Portions Copyright Buildbot Team Members
# Portions Copyright 2011 National Instruments


# Many thanks to Dave Peticolas for contributing this module
Expand Down Expand Up @@ -65,11 +66,14 @@ def __init__(self, p4port=None, p4user=None, p4passwd=None,
p4base='//', p4bin='p4',
split_file=lambda branchfile: (None, branchfile),
pollInterval=60 * 10, histmax=None, pollinterval=-2,
encoding='utf8'):
encoding='utf8', project=None):
# for backward compatibility; the parameter used to be spelled with 'i'
if pollinterval != -2:
pollInterval = pollinterval

if project is None:
project = ''

self.p4port = p4port
self.p4user = p4user
self.p4passwd = p4passwd
Expand All @@ -78,6 +82,7 @@ def __init__(self, p4port=None, p4user=None, p4passwd=None,
self.split_file = split_file
self.pollInterval = pollInterval
self.encoding = encoding
self.project = project

def describe(self):
return "p4source %s %s" % (self.p4port, self.p4base)
Expand Down Expand Up @@ -183,7 +188,8 @@ def _poll(self):
comments=comments,
revision=str(num),
when_timestamp=util.epoch2datetime(when),
branch=branch)
branch=branch,
project=self.project)
wfd = defer.waitForDeferred(d)
yield wfd
wfd.getResult()
Expand Down

0 comments on commit 1bf500c

Please sign in to comment.