Jump to content


Locking files in commons

commons lock exclusive

  • Please log in to reply
3 replies to this topic

#1 Alejandro Garcia-Tunon

Alejandro Garcia-Tunon

    Member

  • Members
  • PipPip
  • 10 posts

Posted 09 July 2014 - 04:48 PM

I was wondering if there is a system built into Commons to lock a file so that no one else can edit it or submit changes?

#2 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 09 July 2014 - 05:35 PM

Perforce does provide exclusive locking on files, which is handled on the server side via the '+l' filetype or the 'p4 lock' command.

See the following for references:

  http://answers.perfo...clusive-Locking

  http://www.perforce....es.html#1040647

  http://answers.perfo...en-l-File-Types

  http://www.perforce....ef/p4_lock.html

  http://www.perforce..../p4_unlock.html

Also in Commons there is a configuration property 'lockTimeoutInMillisecs' which is used for synchronizing non-file writes in a multi-Commons server environment, how long, in milliseconds, to wait on a locked .commons file before recovering the lock. See 'Setting the Commons configuration properties':

  http://www.perforce.....html#DB5-42408

#3 Alejandro Garcia-Tunon

Alejandro Garcia-Tunon

    Member

  • Members
  • PipPip
  • 10 posts

Posted 10 July 2014 - 04:24 AM

I understand the concept of exclusive checkout and locking files with regards to the p4 command line client and P4V.  What I don't see is an interface to lock files or exclusive checkout files when using Commons.  Is there a way, for example, for a team to be managing and editing files completely in Commons, and then for a team leader to lock a file, thereby signifying to the rest of the team members that they should not be (and cannot be) adding revisions?

#4 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 10 July 2014 - 06:19 PM

The Commons client interface handles check-in/check-out and submits but not exclusive checkout and locking on files. You do not see it as it does not exist in Commons but can be done via either the command line or P4V.





Also tagged with one or more of these keywords: commons, lock, exclusive

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users