tags:

views:

36

answers:

2

Say I've got a \\Repo\... repo. Currently devs generally tend to do all their work directly in there, which normally isn't a problem for small pieces of work. Every so often, this approach fails for various reasons, mainly because they're unable to submit the incomplete change to Live.

So, I was wondering, is there a way to enforce on the server that: 1) no files can be directly checked out from \\Repo\... 2) users then branch to a private area (\\Projects\...) 3) dev, test, submit, dev, test, submit, ... 4) on dev complete, they can re-integrate back into \\Repo\...

I guess the last part is the problem, as files need to be checked out! Has anyone implemented something similar? Any suggestions are much appreciated.

+2  A: 

There is no way (that I know of) to enforce this type workflow in P4. You could try to enforce it by setting commit triggers, restricting permissions, or locking files however I believe it would only result in more work (micro-management) and frustrate you and your team.

The best way to establish and enforce any SCM workflow is to set as company/studio policy. Your team should be responsible/able to follow the set procedure and determine (by themselves or through discussion) if an issue is able to be fixed in the main line.

One note about the proposed workflow; creating a new branch for every issue will eventually cause issues and at some point you will need to perform maintenance on the server to conserve disk space and depot browsing speed.

For more information (over) branching on Perforce read this Perforce blog entry from 2009: Perforce Anti-Patterns Part 2: Overuse of branching.

In many studios using Perforce, most developers have their own "working" branch which they continually re-use whenever there are changes that are not safe or able to be performed in the main line.

Dennis Roche
Good info - I agree with the trade-off's between creating a new branch for every issue and extra server maintainance. I guess education is probably the best inducement going forward.PS: thanks for the perforce blog link - loads of excellent stuff there.
cristobalito
+1  A: 

if i understand your questions properly, you should try with shelving features and working offline features of Perforce. Process is main thing to achieve success in this senario. So you might need to setup a right process to execute this.

For more Info about shelving and working offline with perforce, you can try following links...

  1. http://www.perforce.com/perforce/doc.current/manuals/cmdref/shelve.html
scmGalaxy