zss_text.gif

Setting Up Perforce Access


Download | Products

Quick transcript from email:

On Friday, Jul 4, 2003, at 02:09 US/Pacific, Ryan Davis wrote:

I messed up a couple of details. Notes inline:

This is what I recommend. Substitute paths as you see fit and/or actually work

1) mkdir -p ~/Work/p4/zss       # I always have the repository type (p4|cvs) then the org
2) cd ~/Work/p4/zss
3) Create a file called ".p4config" and in it put:
P4PORT=perforce.zenspider.com:1666
P4USER=brianw
P4PASSWD=SOMETHING  -- nothing uber secretive... just something better than nothing or "password"
P4CLIENT=brianw-machine_or_project
P4EDITOR=whatever--this is optional

P4USER and P4CLIENT are important. Keep P4USER the same no matter how many different usernames you actually use on whatever machines you might work on (ie, random vs bwisti vs brianw). I need to know your username to set up your client. Just email me and I'll get it in ASAP.

You can do all but the last step w/o me setting up your permissions, so go ahead and get it all done except for the last part.

P4CLIENT is more arbitrary. On zenspider, it must start with your username. I only have one checkout per machine, so I put my machine name in the client. Others might have user-machine-project if they want to split it up more. For now, just use user-machine.

4) either create an env file you plan to source or simply add to your .profile/.bashrc/.zshrc/whatever: export P4CONFIG=.p4config (or however you set a global variable in your shell). This simply helps p4 find the .p4config file above. It searches all parent directories for a file of that name. That way, whenever you are anywhere in the subtree of Work/p4/zss, you'll always pick up this config file.

5) run 'p4 user' and please fill out the Email and Full Name fields.

Also add the Password field with the password from above. Otherwise, it won't save any changes! Go figure.

6) run 'p4 client'. This will bring up your editor on a new file. If you are on DHCP or something where your hostname can change, clear out the Host: field.

Go to the "View:" section at the end where you'll see something like:

//doc/...  //ryand-greed/doc/...
//src/...  //ryand-greed/src/...
//usr/...  //ryand-greed/usr/...
//www/...  //ryand-greed/www/...

Strip off everything but the src line and change it to read:

//src/%%1/dev/... //ryand-greed/src/%%1/dev/...

Then save and exit.

6) finally, run 'p4 sync'.

You'll check out all the files in my source depot. All files get checked out read only. When you want to edit a file, 'p4 edit filename'. Please do this on a file by file basis, don't do '*' or whatever.

PLEASE get all code reviewed and include who reviewed it in the comment of the submission. Once you have a review, you can submit with 'p4 submit'.