[p4] exclusive checkout across branches
David Weintraub
qazwart at gmail.com
Mon Jan 8 10:31:44 PST 2007
Jamie:
Once you set the +l type, that file is always locked on checkout. You
don't have to do anything in the protection table. To change the file
type, checkout the file with
"p4 edit -t +l <fileName>" command. When you submit the changes, the
file type will automatically be exclusively locking whenever some one
does a "p4 edit" on that file.
So, to fix the files that need exclusive locking, simply check them
out with the +l type and resubmit it. Remember you can checkout files
on multiple branches if you have your client setup correctly. For
example, let's say you want to lock:
//depot/Product/MAIN/Component/Dir/foo.bar
And on all branches. Simply do:
$ p4 edit -t+l //depot/Product/*/Component/Dir/foo.bar
If all of your files end in *.bar, then use a command like this:
$ p4 edit -t+l //.../*.bar
There is no need to edit the protection table. There is no need for a trigger.
On 1/8/07, Jamie.Echlin at barclayscapital.com
<Jamie.Echlin at barclayscapital.com> wrote:
> Hi Steve, thanks for you replies.
>
> Yep I thought the +l was only on the branch, so wondering whether a
> trigger or using the protections table is the best approach.
>
> cheers, jamie
>
>
> > -----Original Message-----
> > From: steve at vance.com [mailto:steve at vance.com]
> > Sent: 08 January 2007 12:49
> > To: Echlin, Jamie: IT (LDN); perforce-user at perforce.com
> > Subject: RE: [p4] exclusive checkout across branches
> >
> >
> > The +l modifier will only affect the instance of the file on
> > a particular
> > branch. If you need it exclusive across all branches, you will have to
> > invent your own mechanism.
> >
> > Also, a reminder. If you decide each instance is sufficient
> > and change the
> > type to include +l, be sure to use the -t flag when you integrate the
> > changed file type around so that the file type change propagates.
> >
> > Original Message:
> > -----------------
> > From: Jamie.Echlin at barclayscapital.com
> > Date: Mon, 8 Jan 2007 11:31:37 -0000
> > To: perforce-user at perforce.com
> > Subject: [p4] exclusive checkout across branches
> >
> >
> > Sorry for all the traffic, trying to bring myself up to speed.
> >
> > A group has certain files that should be "exclusively lock", including
> > across branches. This is particular named files, not all having a
> > certain extension or anything so simple.
> >
> > I guess an implementation option is using +l in the typemap, and
> > protections file to make read-only everywhere except the main
> > branch. I
> > don't want to do this because I'm wary of adding many rows to
> > protections, also I want something whereby they can make
> > changes to this
> > list without having to be admin.
> >
> > I guess many people have this sort of requirement, any suggestions?
> >
> > My preferred option is a trigger which would read a project-supplied
> > file containing list of "special access rules", ie depot path patterns
> > and rules. However the trigger would only fire on submitting the
> > changelist, not when they make the checkout. I prefer a
> > trigger because
> > it allows us to provide some explanation of the failure - eg
> > please make
> > these changes in this branch..., as opposed to using the permissions
> > table which would just say "access denied"...
> >
> > Thanks in advance,
> > jamie
> >
> > --------------------------------------------------------------
> > ----------
> > For more information about Barclays Capital, please visit our
> > web site at
> > http://www.barcap.com.
> >
> > Internet communications are not secure and therefore the
> > Barclays Group
> > does not accept legal responsibility for the contents of this
> > message.
> > Although the Barclays Group operates anti-virus programmes,
> > it does not
> > accept responsibility for any damage whatsoever that is
> > caused by viruses
> > being passed. Any views or opinions presented are solely those of the
> > author and do not necessarily represent those of the Barclays Group.
> > Replies to this email may be monitored by the Barclays Group for
> > operational or business reasons.
> > --------------------------------------------------------------
> > ----------
> >
> > _______________________________________________
> > perforce-user mailing list - perforce-user at perforce.com
> > http://maillist.perforce.com/mailman/listinfo/perforce-user
> >
> >
> > --------------------------------------------------------------------
> > mail2web - Check your email from the web at
> > http://mail2web.com/ .
> >
> >
> >
>
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
--
--
David Weintraub
qazwart at gmail.com
More information about the perforce-user
mailing list