tags:

views:

1959

answers:

3

How do I get a list of the files checked out by users (including the usernames) using P4V or P4? I want to provide a location and see a list of any files under that location (including sub folders) that are checked out.

+5  A: 

From the command line:

p4 opened -a //depot/Your/Location/...

The ... indicates that sub folders should be included.

Iain
Note that the -a option is what answers the question for the command line. "The -a flag lists opened files in all clients. Normally only files opened by the current client are listed."
Jared Oberhaus
+7  A: 

You can also restrict the output of p4 opened like so:

p4 opened -C <client-spec> //depot/...

to get a list of files opened on that client-spec

p4 opened //depot/...

will give you a list of files opened by the current P4USER

Mark
+2  A: 

Seeing as you also asked about P4V and only had command line answers so far, here's what you do for P4V. The "Pending" pane gets you part way to what you want. Ensure the "User" and "Workspace" filters are cleared, and you'll get a list of all files grouped by changelist and client spec. Not as clean as the straight list of files you get when using the P4 command line as suggested by Iain and Mark, but may help in some situations.

An alternative is to create a custom menu in P4V that uses one of the command line solutions suggested. For example:

  1. Tools->Manage Custom Tools
  2. New
  3. Call it something e.g. Open files by user
  4. Check the "Add to applicable context menus"
  5. In Application field, browse to p4.exe
  6. In Arguments, type opened -a %D (the latter takes the currently selected depot path)
  7. Check the box to run in a console.

I'm sure you could fancy this up a bit if needed to filter the output.

Greg Whitfield
that would just give you a list of pending changelists for the path in question, not a list of files.
ninesided
Fair point, but I think already covered by my last sentence. I've edited my answer with an alternative.
Greg Whitfield