In Perforce, how do I list all changesets for a given user? Can that be done via a single "p4" command?
To display shelved changelists, use p4 changes -s shelved , and then use p4 describe -s -S changelist to display the files in the selected changelist(s).
When you check out a file, Perforce adds information about the file to a changelist and changes the writable attribute of the file in your local workspace from read-only to read/write. A changelist defines a logical grouping of work across a set of files and folders.
The p4 fstat command dumps information about each file, with information for each field on a separate line. The output is best used within a Helix C/C++ API application where the items can be accessed as variables, but is also suitable for parsing by scripts.
Quick start with p4Open p4v (visual Perforce client). Right click on the project folder. Click "Open Terminal". Now you can use p4 in a preconfigured console, you don't need to setup workspace and server connection.
Yes.
p4 changes -u <username>
In Powershell 2.0:
p4 users
| select-string "^\w+(.\w+)?" | %{$_.Matches} | %{$_.Value}
| %{p4 changes -u $_}
The first line shows all users, the second line parses out the username from the output, adn the third line sends that input to p4 changes
.
EDIT: The regex assumes your usernames are either a single word or a firstname.lastname format. You may need to edit it for different formats.
EDIT2: Ooooh for a given user. Arse.
EDIT3: Shorter powershell:
p4 users
| select-string "^\w+(.\w+)?" | %{$_.Matches}
| %{p4 changes -u $_.Value }
EDIT4: even shorter powershell:
p4 users | % { p4 changes -u $_.Split()[0] }
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