[p4] What is the best strategy to prevent P4 users from overwriting the latest file revision in P4 Depot with an older revision?
Alok Narula
anarula at beceem.com
Tue Sep 4 03:33:31 PDT 2007
Hi,
I'm finding that some developers do not sync their workspaces with the
head revision before making changes to the source code and overwrite the
latest revision with an older revision of the file. What is the best
strategy to prevent P4 users from overwriting the latest file revision
in P4 Depot with an older revision?
The immediate solution that came to my mind works as follows:
1. When a P4 user syncs files from the depot, create a list
containing all the files that were synced along with their revision#.
2. At the time of submission, compare the revision# of the depot
file with the revision# of the workspace space. If the delta is > 0,
warn the user that the file being submitted has undergone N revisions
since being synced (where N is the delta). This will inform the user of
the danger of submitting an older revision.
I reckon I can write a trigger to implement my solution. I would like to
know if somebody has a better way of solving this problem.
Thanks,
Alok
Beceem Communications
More information about the perforce-user
mailing list