Create a workspace with a root of null and map the depot to that client. Here's an example client spec:
Client: client_nameUpdate: 2010/10/20 14:18:23Access: 2010/10/20 14:20:53Owner: ravenHost: ravens-pcDescription: Created by raven.Root: nullOptions: noallwrite noclobber nocompress unlocked modtime rmdirSubmitOptions: leaveunchangedLineEnd: localView: //depot/... //client_name/...The first thing your script should do is switch to this client by setting the $P4CLIENT$ environment variable:
p4 set p4client=client_name
You script will now be working in the context of that client. By virtue of the fact that you have specified a root of null, any syncing that you do will be relative to the current directory. So, if you sync //depot/foo/... while in C:\bar, your files will appear in C:\bar\foo.
The last thing your script should do is clear the P4CLIENT variable to restore the system to the default client specification:
p4 set p4client=
No comments:
Post a Comment