[p4] Better understanding of +/- client spec syntax
Weintraub, David
david.weintraub at bofasecurities.com
Thu Aug 10 10:28:59 PDT 2006
I'll try to answer your questions:
1. The line "//depot/a/b/c //view/a/b/c" (NOTE THE "//" before the view
name!) basically says don't include file //depot/a/b/c in my working
directory. Later mappings always override earlier mappings, so the
third line makes the second line unnecessary.
2. When the left side starts with a minus sign, the right side is a
dummy placeholder and doesn't do anything.
PLUS SIGNS
==========
Here's a real life example. Our user "merbld" is our Perforce archive
owner, build user, and contains all common executable utilities for our
development team. These utilities are stored in /home/merbld/bin. In my
Perforce depot, I use the //depot/Perforce/MAIN/bin for all Perforce
related executable utilities, and //depot/Efp/Unix/Merlin/MAIN for
storage of files that are in merbld. This includes build scripts, etc.
in the //depot/Efp/Unix/Merlin/MAIN/bin directory.
Therefore, files that should be in /home/merbld/bin are in both the
//depot/Efp/Unix/Merlin/MAIN/bin and //depot/Perforce/MAIN/bin
directories of my depot.
In order to get the files in the depot into my /home/merbld/bin
directory, I created a Perforce client with /home/merbld/bin as its root
directory. I use the following view mapping:
//depot/Perforce/MAIN/bin/... //merbld-bin/...
+//depot/Efp/Unix/Merbld/MAIN/bin/... //merbld-bin/...
Now, when I do a "p4 sync" the files in both of these depot directories
will now be copied into my /home/merbld/bin directory. If there is a
file of the same name in //depot/Efp/Unix/Merbld/MAIN/bin and
//depot/Perforce/MAIN/bin, the version on
//depot/Efp/Unix/Merbld/MAIN/bin will take precedence (which, come to
think of it, is *not* what I want. I need to change these two lines
around).
-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Steven W. Orr
Sent: Thursday, August 10, 2006 11:31 AM
To: Perforce Users
Subject: [p4] Better understanding of +/- client spec syntax
A while ago I asked a clientspec question, but I want to ask a new one
of a more general nature. I'm trying to understand the +/- usage.
Given multiple view lines in a clientspec with destination files mapped
from multiple sources, the last line is the winner. I get that part. I
like it and it makes sense.
MINUS SIGNS
I can use the "-" to prevent something from being selected. That's fine
with me.
1. Is the "-" of use if I'm depending on multiple mappings? IOW, if I
expect a file to be created and it could come from more than one place,
is there value in deselecting it from where I don't want it even though
I get it from the later match?
Here's a contrived example:
//depot/a/b/... /view/a/b/...
-//depot/a/b/c /view/a/b/c
//depot/x/y/c /view/a/b/c
Is the deselected line of any use?
2. Is the right hand side of a "-" a dummy or does it have any value at
all?
PLUS SIGNS
I have no idea what the value of "+" is. If I specify a plus sign to
override something that was previously selected earlier, then it would
have been picked off anyways.
//depot/a/b/... /view/a/b/...
+//depot/x/y/c /view/a/b/c
Does someone have an example of a plus usage that makes sense?
TIA
--
Time flies like the wind. Fruit flies like a banana. Stranger things
have .0.
happened but none stranger than this. Does your driver's license say
Organ ..0 Donor?Black holes are where God divided by zero. Listen to me!
We are all- 000 individuals! What if this weren't a hypothetical
question?
steveo at syslang.net
_______________________________________________
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