[p4] Linking support in the server
Qazwart
qazwart at gmail.com
Mon Feb 12 17:24:12 PST 2007
Subversion has the best way of handling this type of issue, and I'd
sure wish Perforce would pick it up. In Subversion, you create an
attribute on a directory that says it depends upon another directory.
For example, you'd put the attribute on App0, App1, and App2 to say
that they depend upon Common/Data. Then, when a developer checks out
App0, Common/Data would also download, but as a read only directory.
It was simple to find all shared dependencies, it encouraged
developers to plan out their dependencies, and it was simple to
maintain. Even better, it was easy to make the dependency depend upon
a particular version of the shared directory. It was one of my
favorite features of Subversion.
SafeSource, on the other hand, did this in the worst possible way. It
shared individual files. If you added another file in a shared
directory, you had to add it manually to all other shared instances.
And, the shared file could be embedded right in someone else's
project. Even worse, there was no way to easily tell if a file was
shared between projects. Editing it in one place would suddenly
change it in all the locations in your archive.
Perforce really doesn't have an automated way to handle this. The
best way I've seen is to create integrations of the shared directory
into the other projects:
$ p4 integ //Depot/Common/Data/... //Depot/App0/Data/...
$ p4 integ //Depot/Common/Data/... //Depot/App1/Data/...
$ p4 integ //Depot/Common/Data/... //Depot/App2/Data/...
You can then set the Protection table to prevent almost all users
from editing the shared directory files. If files change in //Depot/
Common/Data, you could rerun the "p4 integ" command, and
automatically update all the shares. Of course, using a branch
definition would make it easy to track all the places where the
directory is shared instead of running individual "p4 integ" commands
on each application.
On Feb 12, 2007, at 1:05 PM, Jesus de Santos Garcia wrote:
> 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?
>
> In the past, I remember using links in SourceSafe to solve this. I've
> seen that p4 server support a type link, but it is supposed to work
> only
> in linux (?). Are they supported in a Win32 server (using the links in
> NTFS with linkd for example).
>
> Thanks.
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
More information about the perforce-user
mailing list