Paul Mark Castillo
Paul Mark Castillo

Reputation: 147

How to link to the same workspace?

I have two computers: Work, and Home.

My workspace in my Work Laptop is synced in a Dropbox. That's why I could access my work at home.

But when I try to setup my Perforce at home, I don't know how to link or detect that I have an existing workspace in my Dropbox.

How?

Upvotes: 1

Views: 2949

Answers (2)

user2511207
user2511207

Reputation: 54

First, I'll assume you can access your Perforce server from home, since you don't mention this in your problem statement.

Next, I'll assume you're able to use the same directory structure at home that you use at work (e.g. C:\Dropbox\projx).

When you create your client spec at work, be sure to edit out the HOST: line, since you'll be using it on two machines.

Use the same client name at home that you use at work.

If for some reason you are unable to use the same directory structure on both machines, you may have to use "p4 client" to change the ROOT: line of your client spec every time you switch between home and work.

Alternatively, you could use two different clients, and use "p4 shelve" to move files to the server when you're done for the day.

Upvotes: 3

jamesdlin
jamesdlin

Reputation: 90015

You basically just need to tell Perforce the name of your client. Usually you'll do this by adding a .p4config file in your Perforce client's root directory (or in one of its parent directories) that contains the line:

P4CLIENT=your-perforce-client-name

You might also need to add an environment variable that points to this file: P4CONFIG=.p4config.

If the local path to your client's root is different between your work and home machines, you'll also need to set AltRoots in your Perforce client specification and add the path for your home machine.

Upvotes: 3

Related Questions