Iain
Iain

Reputation: 12779

In Perforce, how do I get a list of checked out files?

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 depot location and see a list of any files under that location (including sub folders) that are checked out.

Upvotes: 47

Views: 60598

Answers (6)

Tibor den Ouden
Tibor den Ouden

Reputation: 21

In p4v : try to do a rename of the top directory. You will get a warning and list of the currently checked out files with user names.

Upvotes: 2

ForceMagic
ForceMagic

Reputation: 6379

I just want to point out something about about the command line arguments.

It is important to add the "/..." after the folder you want to look over because it will tell perforce to do it recursively.

So, I was trying this at the beginning :

p4 opened -a //myP4Path/dev_project

Which wasn't working until I did this:

p4 opened -a //myP4Path/dev_project/...

Upvotes: 6

eeerahul
eeerahul

Reputation: 1627

In case you want to search for a particular user:

p4 opened -u the_user_name

In case you want to search for particular Changelist:

p4 opened -u the_user_name -c cl_number

Upvotes: 8

Greg Whitfield
Greg Whitfield

Reputation: 5739

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.

Upvotes: 26

Mark
Mark

Reputation: 10182

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

Upvotes: 21

Iain
Iain

Reputation: 12779

From the command line:

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

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

Upvotes: 35

Related Questions