Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-28-2005, 06:27 PM
epu epu is online now
Registered User
 
Join Date: 10-29-2003
Location: San Francisco, CA
Posts: 29
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.
Reply With Quote
  #2  
Old 04-29-2005, 11:34 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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.
Reply With Quote
  #3  
Old 04-29-2005, 12:33 PM
epu epu is online now
Registered User
 
Join Date: 10-29-2003
Location: San Francisco, CA
Posts: 29
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.
Attached Files
File Type: bld kinook_perforce_example.bld (2.7 KB, 1838 views)

Last edited by epu; 04-29-2005 at 12:49 PM.
Reply With Quote
  #4  
Old 04-29-2005, 12:37 PM
epu epu is online now
Registered User
 
Join Date: 10-29-2003
Location: San Francisco, CA
Posts: 29
logfile

here is the logfile from a run with the step 'Set PWD' disabled.
Attached Files
File Type: txt kinook_perforce_example.log.txt (4.6 KB, 2088 views)
Reply With Quote
  #5  
Old 04-29-2005, 12:38 PM
epu epu is online now
Registered User
 
Join Date: 10-29-2003
Location: San Francisco, CA
Posts: 29
logfile with Set PWD enabled

Also prints value of PWD as Root: field even though the variable is not exported.
Attached Files
File Type: txt kinook_perforce_example_enabled.log.txt (4.6 KB, 1897 views)
Reply With Quote
  #6  
Old 04-29-2005, 12:54 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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.
Reply With Quote
  #7  
Old 04-29-2005, 01:52 PM
epu epu is online now
Registered User
 
Join Date: 10-29-2003
Location: San Francisco, CA
Posts: 29
:/
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
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 09:05 AM.


Copyright © 1999-2023 Kinook Software, Inc.