James
James

Reputation: 422

Perforce: Cannot lock file error during a stream merge

I have a developer that is working on merging changes from main to a development stream and he is receiving this error when trying to submit the change list:

File(s) couldn't be locked.
Submit failed -- fix problems above then use 'p4 submit -c 8102'

Can someone confirm that Perforce requires that files be locked during an integration/merge? Or is this simply a work space issue?

And is there a way for us to allow our developers to continue working (not making them check in all files on the stream) for their lead to execute the merge?

Upvotes: 0

Views: 4399

Answers (2)

davidh
davidh

Reputation: 1

He probably doesn't have permissions on that branch. Use p4 protect to control Perforce permission.

Upvotes: 0

Bryan Pendleton
Bryan Pendleton

Reputation: 16389

File locking is used to coordinate and serialize those submit commands that modify the same files in the repository.

Your developer's submit failed because some other developer has those files locked.

You can use 'p4 opened' to see which other developer has those files locked. Typically, the files were left locked by that other developer due to a partially-completed submit. If that other developer is not intending to finish that submit anytime soon, you can use the 'p4 unlock' command to release those locks and allow the affected developer to submit first.

Upvotes: 1

Related Questions