Getting Perforce client(not server) setup in Linux

Nov 14th, 2017 | By | Category: Internet, Linux / Freebsd

Taking notes on steps needed to setup the client in linux so I can commit locally from our server.  I have setup the depot from my remote windows machine as well as the stream, what I’m doing in linux is client specific setup.  Obviously when you see terms like {port} or {depot} you shoould replace those with your specific ports or depot names

Remember if you screw up and need to revert a changelist you can check out my handy guide here: http://blog.netflowdevelopments.com/2016/12/13/by-htm/

On Windows remote machine(for ease of use) in P4A:

  1. Create depot
  2. Create user
  3. Create group
  4. Add user to group
  5. set read/write perms for group to the depot
  6. login to your perforce server with P4V with the new user you created
  7. Create mainline stream(if this is your style)

 

  1. Copy P4 client onto server
  2. Create perforce user
  3. Ensure /home/perforce exists and is owned/writable by the perforce user or else you will get errors like this: Fatal client error; disconnecting!\nOperation ‘client-SetPassword’ failed.\nToo many trys to get lock
  4. Login with your username
    1. p4 -p localhost:{port} -u {username} login
  5. Create Client Workspace
    1. p4 -p localhost:{port} -u {username} client -S //{depot}/{stream}
    2. This should result in something like this: Client ib-vcs saved.  You can specify the name of your workspace if you like.
      1. simply tack the desired workspace name to the end of the command specified in 5.1 if you don’t want the default
    3. You can read more about this HERE
  6. Go to local directory tree that you want to add to the depot
  7. If you are using the default workspace name you can simply use the reconcile command to recursively add all of the files in the entire tree
    1. p4 -p localhost:{port} -u {username} reconcile
  8. If you have multiple workspaces and you need to use a specific one when adding all these files you first need to set your active workspace with the following command:
    1. p4 -p localhost:1666 -u perforce set P4CLIENT=ExactAndFullWorkSpaceName
    2. after that you can run the reconcile command from 7.1 above
  9. Submit the changeset, entering in the description on the page that comes in up the area that looks like this <enter description here>
    1. p4 -p localhost:{port} -u {username} submit
Tags: , , , , ,

Leave a Comment