[p4] Stopping notepad popup of tmp files while running change and other commands.
perforce-user-forum at forums.perforce.com
Tue Apr 21 07:50:01 PDT 2015
Posted on behalf of forum user 'P4Sam'.
raysid, on 2015/04/21 06:25:52 UTC, said:
> One more thing, once a new client workspace is created on a login and its stream is defined using " p4 client -S //XYZ/JKH -o | p4 client -i" and then after the user's work, the user logs off. My doubt is, for the next time when this user logs in and wants to use his newly created workspace without changing the stream, does this user needs to give or call any command for connecting to the stream defined earlier, or since the copy of workspace at the depot is already associated with the stream, so no such stream information is required before using the workspace for 2nd run/use? - Part 1.
The client spec that describes the stream is stored on the server, so all the
user needs to do is have P4CLIENT set to the name of that same
client. The server remembers which stream that client goes with,
which files are synced to the workspace and at what revisions, which files are
open, et cetera.
> If at all the user wants to change the stream, then he can use switch stream using " p4 client -s -S XYZ " kind of command right? With the case that files open for edit should be either submitted or reverted. In this case following order can be fine I believe;
> 1.p4 set P4CLIENT =[ clientname ]
> 2.p4 client - s - S [ streamname ]
> 3.p4 sync
> For files open for edit, how to treat them, perform a revert before step 2 for the changes which can be undone, perform submit for files which can be submitted before step 2 and finally perform step 2? In the last case if he wants to force the switch without deciding on submit/revert, can step 2 be called with a force -f option? How? And what would be its implications? - Part 2.
Yes, once you've reverted and submitted all files, no files are
open. Note that another option beyond just discarding the files is to
"p4 shelve" them before reverting them; you can then recover them
later with "p4 unshelve".
If you do force the switch with "-f", the files remain open, in the
old location. That means that you will not be able to sync the files
from the new stream into that location, so your workspace will be
incomplete. You also won't be able to submit the files from the
old stream until you switch the client back.
As I mentioned earlier, the new 2015.1 release has a command called "p4
switch" that actually handles the shelving/unshelving for
you. You'd just do:
p4 set P4CLIENT=[clientname]
p4 switch [streamname]
and that would shelve any work you have in progress, switch to the new stream,
and sync, all in one step.
Please click here to see the post in its original format:
More information about the perforce-user