[p4] P4TICKETS like P4CONFIG

Calman, Kevin Kevin.Calman at acs-inc.com
Sat Jan 12 17:12:52 PST 2008


Call me a weirdo, but I like to have as much information in my Windows
system that is common between the native CLI & GUI environments and Cygwin
(and by extension, to other Unix environments) to actually be named commonly
and exist in the same place. Of course, I must segregate the native and
Cygwin CLI binary accessibility, since they don't play well together, but I
do want my environment variables the same between them. As a result, I have
been using a policy of setting the following as an Administrator on Windows
systems:
        p4 set -s P4CONFIG=.p4config
which works just fine. Whether in CMD or Bash, the appropriate P4 client
will find a file called '.p4config' on any directory from the current up to
the root (of that disk).
    However, I just recently upgraded my installation from 2003.2, which did
not "officially" support tickets, to 2007.2 which does. Now I try to do
something similar for P4TICKETS, 
        p4 set -s P4TICKETS=.p4tickets
This appears to have the behavior of setting the name of the file that the
P4 client uses for ticket storage, AS WELL AS the path to that file, which
appears to be '.\' (see the attached transcript). I was expecting it to
default to %USERPROFILE%, or perhaps trace up the directory tree from
current to root looking for a .p4tickets file as P4CONFIG does. But no!
    Seeing this, I then tried the following,
        p4 set -s P4TICKETS="%USERPROFILE%\.p4tickets"
which worked for me, but had the side effect of making this (expanded) value
of P4TICKETS the default for other users on the same system, having the
effect of making them instantly appear to be logged out and unable to log
in, since they can't overwrite the .p4tickets file in my home directory.
Making a similar change but not system-wide (i.e., not in the registry)
        p4 set P4TICKETS="%USERPROFILE%\.p4tickets"
works for the one session I issue that command in, but other CMD instance
and the GUIs do their own thing to resolve the name and location of the
tickets file. The only solution I found that worked satisfactorily is to
define a system-wide environment variable for my user account (i.e., not
global) that set the value above.
    So, would modifying the behavior of the P4TICKETS mechanism to be more
like P4CONFIG violate a fundamental design constraint? I, for one, would
find it more useful.
--
Opinions herein are exclusively my own, unless you share them.
Kevin Calman, kevin dot calman at acs dash inc dot com

"CONFIDENTIALITY NOTICE: This email message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure, or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply email and destroy all copies of the original
message."
 
 
C:\Documents and Settings\kcalman\tmp> p4 set P4TICKETS=.p4tickets
C:\Documents and Settings\kcalman\tmp> p4 login -s
Perforce password (P4PASSWD) invalid or unset.
C:\Documents and Settings\kcalman\tmp> cd ..
C:\Documents and Settings\kcalman> p4 login -s
User kcalman ticket expires in 5 hours 10 minutes.
C:\Documents and Settings\kcalman> cd ..
C:\Documents and Settings> p4 login -s
Perforce password (P4PASSWD) invalid or unset.
C:\Documents and Settings>


More information about the perforce-user mailing list