tags:

views:

63

answers:

3

Can user have private area on Perforce server ?

This area will be used by user to check-in code/files for which exact target branch is undecided.

Also this area wont be shared, so this code is not visible to any other user other than himself. Not visible to other users should be preferred but not a must to have.

+3  A: 

Assuming you are the admin (or know the admin) of the Perforce server, you can use the protections table of Perforce to accomplish that. With the help of the manual, what you need to do is

  • Set up the branches (if they don't exist yet)

  • Give the user all rights on his branch (list, read, write).

  • If you want to prohibit branching off of that location, specify the =branch right.

  • For all other users, you'd deny those rights (i.e. =read, =write).

I want to add that this protection table could grow pretty big (depending on the number of Perforce users you have) and you need to be sure that the benefit is worth the hazzle.

jhwist
A: 

Sorry if I've misunderstood the question, but I think the functionality you require is called "Shelving".

In P4V, you can right-click on your pending changelist and select "Shelve". This has the effect of "checking in" in the sense that your code is safely held on the server, but it's unlike checking-in because your code doesn't go into any branch of your project.

Normally other users won't see the contents of your shelves, but, depending on permissions, it is possible for one user to browse another's workspace and see his shelved files. Even so, it will be clear to them that they're looking at shelved files.

Martin
Shelved files would be visible to others, though.
jhwist
Yes, I would like to say that Perforce has a permissioning structure that allows you to prevent this but I'm not certain that it does. That said, I didn't read the question as requiring privacy - just that other users shouldn't get his files when they "get latest". I wonder if YoK can clarify?
Martin
Edited my question with not visible to other users as preferred but not must.
YoK
+1  A: 

At our company, we have a Sandboxes portion of the depot, with individual users having directories underneath that. It doesn't use any permissions or anything technical from Perforce to enforce this, but it is generally understood that a user's sandbox area is just for that use, liable to have broken or partial code, and shouldn't be relied upon for anything (or even to exist in the same form from one day to the next).

We also have some sandboxes for specific projects that show up once in a while. It might make other users curious, depending on how the sandbox was named, but the same general idea applies to them - just with a few more users working in the area, so a little bit less likely to arbitrarily change.

One benefit of this is the ability to tell another user that they can pull some changes made in a sandbox, or look at them for ideas, if desired. You would lose that possibility with restrictive permissions.

Caleb Huitt - cjhuitt
thanks. Sandboxes portion looks like way to go with undecided target kind of code. This looks like missing in our env. Will ask our administrator to create one.
YoK
Caleb, isn't the Sandbox just another Depot path? I'd call it "development" branch or something like that, it doesn't give any extra security.
jhwist
@jhwist: Yes, it is just another Depot path. For us, we have (among others) //depot/Development/Main for the "proper" code, and //depot/Development/Sandboxes for the user-run areas of code.
Caleb Huitt - cjhuitt
The important part of the answer, to me at least, is the idea that social conventions can be just as useful, or even more so, as software-enforced restrictions for things of this nature. This isn't always true, but often is.
Caleb Huitt - cjhuitt