Jump to content

Prevent P4VS from editing files checked out by someone else

  • Please log in to reply
1 reply to this topic

#1 SeanT



  • Members
  • PipPip
  • 13 posts

Posted 31 March 2017 - 10:22 AM

We current have our checked out files set to exclusive lock which prevents anyone else editing the files at the same time, if you try and check out from within P4V it comes up with a dialogue box stating "Cannot check out "exclusive open" file(s) which i just as we expect.

If we try editing a file from within visual studio that has been checked out by someone else there is a warning shown in the output pane stating "E_WARN: filename - files(s) not open on this client." and i can then modify the file albeit only in memory, when i come to save the file i am then warned that it is read only, this is far too late when having exclusive locks, i should be prevented from editing the file immediately and on our previous source control provider this was the behaviour we had.

There is a Visual Studio option "Allow editing of read-only files; warn when attempt to save" which is under Options->Environment->Document which we have unticked, P4VS seem to be overriding this option and allowing edits which it shouldn't.

I have gone through all the P4VS options and i can't find any way of preventing this, so my question is, is there anyway of preventing P4VS from allowing me to edit files checked out by someone else when set to exclusive lock? If not then it makes the whole P4VS plugin useless as we will have to uninstall it to prevent accidental edits that can't be saved.

#2 p4bill


    Advanced Member

  • Members
  • PipPipPip
  • 160 posts

Posted 02 January 2018 - 07:41 PM

Thanks for bringing this to our attention, this was fixed in a 2017.2 patch:

1587872 (Bug 91031, 93281) *
                P4VS no longer allows in memory edits of files that are
                exclusively opened and will display a message to the user on
                attempt to edit.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users