Jump to content


A bug of checkout exclusive file in two clients

BUG

  • Please log in to reply
4 replies to this topic

#1 minzhi.han

minzhi.han

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 24 February 2017 - 04:04 AM


I find a bug about perforce, and I don't known where to report it, so I post it here.

  My perforce version is :Perforce Visual Client/NTX86/2014.1/827578.

  The bug is that, two clients can both check out an exclusive file. The reproduce process:

  1. A file "test.file" is submit in version 1,without exclusive checkout flag.

  2. Some one update the test.file, and change the file type to exclusive checkout, submit it in version 2.

  3. Person A checkout the file, the file is locked, and others could not checkout the file.

  4. Person B get the file in version 1. In this version, the file is not exclusive checkout, so B can checkout the file in version 1, and don't get the latest version when checkout.

  5. Person B get the latest version, and resolve it to version 2.

  6. Now B is in version 2 and checkout the file.

  7. Person A and B both checkout the exclusive file in the latest version. If some one submit first, the later one couldn't submit even he get the lock(with checkout).

  I think it is a bug about perforce.


#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 957 posts

Posted 24 February 2017 - 05:08 PM

The exclusive open filetype (+l) isn't really designed to be bulletproof -- you can (or could, this may have changed) also override it by forcing a different filetype when you open the file.  It's meant more to prevent you from *accidental* concurrent edits.

If you want to be really certain nobody else can submit before you do, use "p4 lock" -- this can only be overridden by an admin.  If you "p4 lock" a +l file and somebody else circumvents the +l filetype, they can open the file and make changes but not submit (so they're the one who'll have to deal with the resolve after you submit your revision).

#3 minzhi.han

minzhi.han

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 25 February 2017 - 06:25 AM

@Sambwise, thanks a lot.
Before your answer, When I check out an exclusive file (+l), there is a lock icon in the left of the file, so I think the file is locked. Which means I think check out +l file is the same as lock the file manually.
Now I know the difference.

#4 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 957 posts

Posted 25 February 2017 - 05:52 PM

Yes, I've never been a fan of the fact that P4V shows them the same way; they're different states but just similar enough to be confusing.  :)

#5 p4rfong

p4rfong

    Advanced Member

  • Staff Moderators
  • 343 posts

Posted 28 February 2017 - 06:55 PM

The icons do look the same.  But if you hover over the icon, you can tell if the lock icon indicates an exclusive lock or a "p4 lock".





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users