|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
perforce action global options tab uses PWD for Root: even when it's not exported?
Hey,
I am using a perforce action that runs p4 client with Global options tab > Working folder: set to a value. I also have PWD set as a project macro, and it isn't exported (the output of '%DOSCMD% set' doesn't show PWD is set). However, the Root: of my p4 client is always being set to PWD, even though it's not exported. I think perforce actions shouldn't use perforce-related macro values of PWD unless it is exported for external programs, or that explicitly setting a value in the perforce action should override the macro setting. Currently, at least for PWD, having it set in macros overrides the entry in the action. I am working around this by setting a temp PWD macro before I use the perforce action, but this shouldn't be necessary. Thanks again for a good product. Best, -e oh yeah, I am using v5.7 Last edited by epu; 04-28-2005 at 06:29 PM. |
#2
|
|||
|
|||
The Perforce action itself doesn't do anything with any existing PWD macro or environment variable (unless it's referenced in a field value, of course). Can you send or post an example demonstrating the problem? Thanks.
|
#3
|
|||
|
|||
Example project
Here's a project. You'll have to modify the macros to work with your sample depot. If you need me to reproduce any global macros, I can cut/paste them into a file for you.
In this example, the Root: gets set to PWD even though it's not exported. Perforce does normally accept PWD as a valid variable to set the Root: to. If the project step 'Set PWD' is run, the Root will also be set to the new temp macro PWD, even though it's not exported. I'll post my log file for this in another post just below. Sorry, this first attachment I forgot to delete the PWD macro out of the perforce action, and the second one I forgot to put a fake hard-coded value in the perforce action. Here's the right example. The behavior I expect is for the Root: field to be set to 'c:\this\should\show\up\but\PWD\does\instead' but it is always set to PWD instead. I'm not sure what behavior should be expected if PWD is set and exported and there is a value in the p4 action, but as long as it is documented it should be ok. Last edited by epu; 04-29-2005 at 12:49 PM. |
#4
|
|||
|
|||
logfile
here is the logfile from a run with the step 'Set PWD' disabled.
|
#5
|
|||
|
|||
logfile with Set PWD enabled
Also prints value of PWD as Root: field even though the variable is not exported.
|
#6
|
|||
|
|||
On the Client Spec/Label tab of the Perforce action, the Root field references the PWD macro. The project macro PWD has a value of
C:\p4root\%P4CLIENT% which expands to C:\p4root\BuildZge-kinook_perforce_example (the value assigned to Root when the Set PWD step is not built). When the Set PWD step is built, the temporary macro PWD with a value of V:\ overrides the project macro, so the Root field gets the value V:\ It appears to be doing exactly what you told it to. |
#7
|
|||
|
|||
:/
My bad. There are so many tabs and I sometimes interchange the values 'global options>working folder' and 'client spec/label>Root' internally I guess. Thanks! -e |
|
|