I have read these questions:
However these both deal with finding all the checked out files for a user. This is very useful, but I need to go the other way; what I really want to do is see who has checked out a particular file. Having read the P4 docs, I see no way to do this.
Is there a way in P4 I can check who all has checked out a particular file?
Stupid me found it as soon as I asked.
With P4 in Windows, navigate to the file (it's easy with Ctrl + Shift + S in the P4 Workspace view). Right-click it -> Perforce -> Properties. Look under the "Checked Out By" tab. You can also mouse-over the file icon to invoke a tooltip which will reveal this.
Turns out the same docs I linked to also show how to do it with the command line (p4 opened -a filename
), even if not explicitly offered. The docs say
To determine whether or not another user already has a particular file opened, use p4 opened -a file.
This is a bit of a headscratcher. While you can use this to check if a user has checked out a file, it more specifically lists the users and workspaces in which this file is checked out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With