[p4] Getting creative with the protection table
Ivey, William
william_ivey at bmc.com
Fri May 12 08:22:55 PDT 2006
> -----Original Message-----
> From: perforce-user-bounces at perforce.com
> [mailto:perforce-user-bounces at perforce.com]On Behalf Of Arnt
> Gulbrandsen
> Sent: Friday, May 12, 2006 7:53 AM
> To: perforce-user at perforce.com
> Subject: Re: [p4] Getting creative with the protection table
>
> If I were you, I'd check this after each and every upgrade. And I'd
> check it after each full moon, too.
>
> There's an lwall quote that perfectly describe things like this:
>
> "I find this a nice feature but it is not according to the
> documentation.
> Or is it a BUG?"
> "Let's call it an accidental feature. :-)" Larry Wall in
> <6909 at jpl-devvax.JPL.NASA.GOV>
Actually, it is according to the documentation. Rights are restricted
to the given repository path. The only stretch is that I don't believe
the docs mention the path can be completely fictitious. (I'd be more
worried about other admin commands suddenly failing than that obliterate
would suddenly start working after an upgrade. I'd test both ways.)
I'd actually tried this before, a long time ago before admin was
available. What I hadn't thought to try was the bogus path, so it wasn't
a safe option - the user could find a path where obliterate would work.
(And, my recollection is that if they were sitting in the local
equivalent, they could obliterate any arbitrary path!) Besides, it also
granted all super rights at that time, and that was too much.
By the way, ficticious depots have other uses. We have both periodic
and daily reviews running. When entering the review lines, periodic
reviews are entered in the normal manner, but lines for daily reviews
look like this:
//+D/depot/rest/of/path/... (add to daily review)
//-D/depot/rest/of/path/... (exclude from daily review)
There is also //+U/user and //-U/user which are the same as +/-D but
limit the reviews to changes by a given user.
Since those paths don't exist in the depot, the ordinary p4review.py
script effectively ignores them. Only our custom daily script thinks
they're interesting.
-Wm
More information about the perforce-user
mailing list