[p4] Problem adding files in overlay mapping directories

Chuck Karish chuck.karish at gmail.com
Mon Mar 24 05:34:00 PDT 2008

On Tue, Mar 18, 2008 at 9:05 AM, slalande <slalande50 at hotmail.com> wrote:
>  So lets say my workspace view is the following:
>  //depot/programs/mcc5500/MAIN/... //Client_name/Programs/...
>  //depot/libs/univ/MAIN/... //Client_name/Libs/...
>  +//depot/libs/communication/MAIN/... //Client_name/Libs/...
>  +//depot/libs/winbase/MAIN/... //Client_name/Libs/...
>  +//depot/libs/utility/MAIN/... //Client_name/Libs/...

>  The problem I am presently facing is that when adding a file, for
>  example header.h under communication.  On my computer it will be under
>  //Client_name/Libs/communication/header.h.  But when adding it on the
>  depot, it is adding the files under
>  //depot/libs/utility/MAIN/communication/header.h.

Your many-to-one mapping is ambiguous.  When you use it to
create a file it becomes one-to-many.  Perforce reads the client
spec from bottom to top and chooses the first mapping it
encounters that contains the file you're adding, which is the last
one in your list of overlay mappings.

>  Is there a way to fix this problem and does it has been detected
>  previously.  Perforce should be able to detect where it is added on the
>  workspace and add it directly in the proper depot directory.

How would it do that?  The file is added to a location under
//Client_name/Libs/...  There are four source directories that
map to that location, and no way to chose among them.

Chuck Karish karish at well.com (415) 317-0182

More information about the perforce-user mailing list