Ticket #40 (closed defect: fixed)
step.P4 does not work on windows
| Reported by: | wadeb | Owned by: | warner |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.7.6 |
| Version: | 0.7.5 | Keywords: | |
| Cc: |
Description
The current implementation of step.P4 uses os.environment['LOGNAME'] instead of p4user when creating the clientspec.
This fails on Windows because the LOGNAME environment variable is not set.
The correct behavior IMO is to just use the p4user variable instead of LOGNAME, I'm not sure why that was done though.
Patch to correct:
--- /cygdrive/c/temp/buildbot-0.7.5/buildbot/slave/commands.py 2007-01-27 12:04:44.000000000 -0800
+++ commands.py 2007-05-25 09:21:03.848081000 -0700
@@ -2021,7 +2021,7 @@
['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"
@@ -2036,7 +2036,6 @@
self.p4extra_views = args['p4extra_views']
self.p4mode = args['mode']
self.p4branch = args['branch']
- self.p4logname = os.environ['LOGNAME']
self.sourcedata = str([
# Perforce server.
@@ -2101,8 +2100,8 @@
command = ['p4']
client_spec = ''
client_spec += "Client: %s
" % self.p4client
- client_spec += "Owner: %s
" % self.p4logname
- client_spec += "Description:
Created by %s
" % self.p4logname
+ client_spec += "Owner: %s
" % self.p4user
+ client_spec += "Description:
Created by %s
" % self.p4user
client_spec += "Root: %s
" % self.builder.basedir
client_spec += "Options: allwrite rmdir
"
client_spec += "LineEnd: local
"
Change History
comment:2 Changed 6 years ago by warner
- Status changed from assigned to closed
- Version set to 0.7.5
- Resolution set to fixed
applied in [b6f2a51994bb5bb05600c9f427b550e4de25bfc9]. Thanks!
-Brian
Note: See
TracTickets for help on using
tickets.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
hm, maybe LOGNAME was intended for use in the Description: field, and its use in the Owner: field was a mistake?
regardless, your patch seems correct to me (although mind you I'm not a p4 user), so I'll apply it.
thanks!