[p4] Concept of file ownership
steve at vance.com
Mon Aug 11 17:31:33 PDT 2008
File ownership is not universally considered a good idea. Many Agile
practices center around collective ownership. However, that's for
ability to modify and responsibility for correctness. In that model,
everyone can touch everything and they're responsible for getting it
right. Pair programming puts a safety net on this when done correctly.
However, I don't think that's really what you're talking about.
By 'owner' I assume you mean managerial or administrative
responsibility. I'd be interested to hear what abilities and
responsibilities you associate with this 'ownership'.
Perforce supports some degree of ownership through the protection table.
There are operations that only people with 'admin' or 'super' access can
perform, and 'admin' can be scoped to particular areas like branches or
modules. That is the granularity at which ownership makes the most
sense. You can further reinforce this model through triggers and some
undoc protection levels.
As for adding an explicit marker of ownership, you could add an
attribute (undoc but used by Perforce for production functionality) on
the first revision indicating the owner. I've also seen sites put
metadata files into Perforce or supplemental metadata into databases
alongside Perforce for these kinds of things.
I'm also curious which systems you've seen implement ownership. Although
some I've seen use the term 'owner', they are pretty much equivalent to
Perforce's use of 'user' except where they use file system permissions
to do what Perforce does with the protection table. Out of the box, I
can't think of one that has both concepts.
Calman, Kevin wrote:
> One thing I sorely miss in Perforce from other SCMs the concept of file
> ownership. It seems that the person who touched the code last is the only
> one to be held responsible for any issue that arises in the code, whether
> that person made the faulty change or not. I am aware of the Revision graph
> and Time-lapse views, but they still only give you a listing of who made
> each change, not who owns the file as a whole.
> Identifiable file ownership is important because it ties into the
> practices of peer code review, problem determination, and long-term design
> issues. These cannot be addressed by the developer-du-jour who breezes
> through to implement a feature or fix a defect.
> Was file ownership intentionally omitted from Perforce's feature set,
> and if so, why?
> Could 'owner' be added as an attribute to the File object in Perforce?
> Has it been requested before?
> Are there any good work-arounds in practice that people can suggest?
> Thanks for your feedback.
More information about the perforce-user