11
votes

Is there a way to download a file from a perforce depot without using a client workspace? I know about:

p4 print -o local.file //perforce_depot/remote.file

but this does only work if the requested file is under the clients workspace. I'm looking for something that is only dependent on the user and his rights but not on a workspace...

Thanks!

2

2 Answers

10
votes

Your command will work without a client workspace, as long as the user has permission to access the file, and the file actually exists.

2
votes

Run p4web on your perforce server, and then you can use wget to get any file.

I have my build servers wget their initial kickoff build scripts, that avoids the chicken/egg problem of you need something to kick a build, but you want that something to be in perforce. The only thing not in perforce now is a 2 lines. A wget, and an exec.