From b6f2a51994bb5bb05600c9f427b550e4de25bfc9 Mon Sep 17 00:00:00 2001 From: warner Date: Wed, 8 Aug 2007 04:49:53 +0100 Subject: [PATCH] commands.P4: use p4user to construct the Owner field of the view, rather than LOGNAME. Closes #40. --- ChangeLog | 6 ++++++ buildbot/slave/commands.py | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2378d1c..3a64177 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-08-07 Brian Warner + * buildbot/slave/commands.py (P4): use 'p4user' to construct the + 'Owner:' field of the view, rather than 'p4logname', since + p4logname comes from the buildslave's environment and seems + unlikely to ever do the right thing. Thanks to Wade Brainerd for + the patch. Closes #40. + * buildbot/buildslave.py (BuildSlave.__init__): add max_builds=, which imposes a per-slave limit on how many builds are allowed to run simultaneously. This has a the same scope than the SlaveLock, diff --git a/buildbot/slave/commands.py b/buildbot/slave/commands.py index a08a2e3..49b7c30 100644 --- a/buildbot/slave/commands.py +++ b/buildbot/slave/commands.py @@ -2156,7 +2156,7 @@ class P4(SourceBase): ['p4user'] (optional): user to use for access ['p4passwd'] (optional): passwd to try for the user ['p4client'] (optional): client spec to use - ['p4views'] (optional): client views to use + ['p4extra_views'] (optional): additional client views to use """ header = "p4" @@ -2171,7 +2171,6 @@ class P4(SourceBase): self.p4extra_views = args['p4extra_views'] self.p4mode = args['mode'] self.p4branch = args['branch'] - self.p4logname = os.environ['LOGNAME'] self.sourcedata = str([ # Perforce server. @@ -2236,8 +2235,8 @@ class P4(SourceBase): command = ['p4'] client_spec = '' client_spec += "Client: %s\n\n" % self.p4client - client_spec += "Owner: %s\n\n" % self.p4logname - client_spec += "Description:\n\tCreated by %s\n\n" % self.p4logname + client_spec += "Owner: %s\n\n" % self.p4user + client_spec += "Description:\n\tCreated by %s\n\n" % self.p4user client_spec += "Root:\t%s\n\n" % self.builder.basedir client_spec += "Options:\tallwrite rmdir\n\n" client_spec += "LineEnd:\tlocal\n\n" -- 2.11.4.GIT