[p4] Which command am I missing?

Stephen Vance steve at vance.com
Tue Mar 11 06:11:08 PDT 2008

For automation, it's common to create a login token that has a very long 
expiration by making that user a member of a group with a large Timeout 
value. To pass the password to the login command, send it through stdin 
either via an echo command (which could show up on a process list) or 
via a redirect from a secure file.


dosborne at advisorport.com wrote:
> All,
> I am currently working on 3 projects and am writing MS-DOS batch code to
> automate the get latest process.
> It works fine - but I cannot handle the situation where my session has
> expired - what command do I need to run to re-login to the session?
> Here is what I have. I get the warning 'Your session has expired, please
> login again' after I run the line p4 login -s - do I need a new flag,
> and/or do I need to pass in my username? I looked at the help for the p4
> login command but no joy. I don't see a command to send in my password.
> REM The are environmental variables I set
> p4 set P4CLIENT=%P4CLIENT%
> p4 set P4PORT=%P4PORT%
> p4 set P4USER=%P4USER%
> REM %1 is the project I am logging in to
> p4 login -s
> p4 client -o %P4CLIENT%
> p4 changes -s submitted -L -m 100 //%P4CLIENT%/MyFolder/%1/...
> p4 fstat -P -Olh //%P4CLIENT%/* //%P4CLIENT%/MyFolder/*
> p4 fstat -P -C {9 items}
> p4 depots
> p4 dirs -C {8 items}
> p4 changes -s submitted -L -m 100 //%P4CLIENT%/MyFolder/%1/...
> p4 sync -f //%P4CLIENT%/MyFolder/%1/...#head
> TIA,
> Doug
> The contents of this email are the property of the sender. If it was not addressed to you, you have no legal right to read it. If you think you received it in error, please notify the sender. Do not forward or copy without permission of the sender.
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user

Stephen Vance

More information about the perforce-user mailing list