[p4] Linking support in the server

Ivey, William william_ivey at bmc.com
Tue Feb 13 10:36:17 PST 2007


> -----Original Message-----
> From: perforce-user-bounces at perforce.com
> [mailto:perforce-user-bounces at perforce.com]On Behalf Of Jesus 
> de Santos
> Garcia
> 
> Hi,
> 
> We have a scenario where we need to share some directories between 
> several applications and want those shared directories under the 
> application directory. For example:
> 
> PERFORCE:
> 
>   \Common\Data
> 
>   \App0\
>   \App1\
>   \App2\
> 
> VIEW IN THE CLIENT OF App0
> --------------------------
> C:\App0\Data
> 
> VIEW IN THE CLIENT OF App1
> --------------------------
> C:\App1\Data
> 
> VIEW IN THE CLIENT OF App0
> --------------------------
> C:\App1\Data
> 
> 
> At first, we tried with specific mapping in the client workspace to 
> accomplish this. The problem appeared when an user works in several 
> applications and cannot map a directory to several directories...
> 
> How is the recommended way to solve this?

I usually use one client per application, switching clients when I
move from one application directory to the next. Using P4CONFIG and
a settings file in each application's root directory this is automatic
when using the command line, but you have to manually switch when
using P4Win (and, presumably, P4V).

In practice, though, we've mostly avoided the situation by making the
equivalent of your \Common\Data share the same directory level as the
applications that depend on it:

//Common/Data/... //myClient/Apps/Common/Data/...
//App1/... //myClient/Apps/App1/...
//App2/... //myClient/Apps/App2/...
//App3/... //myClient/Apps/App3/...

You do have to sync two directories at a minimum that way, but it
is otherwise easy enough to maintain. Builds know to look up the
common stuff via a relative path from within the application
directory.

-Wm






More information about the perforce-user mailing list