Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I filter Submitted list by multiple user in Perforce?

Tags:

perforce

p4v

How can I filter the "Submitted" view by multiple users in perforce? I want to just see only a few(4-5?) people in the "Submitted" view. There is a filter function, but filter doesn't take multiple users. So, can I specify multiple users in the "Submitted" view at perforce?

like image 882
P-P Avatar asked Feb 10 '12 04:02

P-P


People also ask

How do I see Perforce users?

p4 users displays a list of all the users known to the current Perforce service. For each user, the information displayed includes their Helix Server user name, their email address, their real name, and the date and time the user last accessed the service.

What does p4 submit do?

To submit a pending changelist, issue the p4 submit command. When you issue the p4 submit command, a form is displayed, listing the files in the changelist. You can remove files from this list. The files you remove remain open in the default pending changelist until you submit them or revert them.

How do I open a Perforce file in Linux?

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.


3 Answers

You are right, there doesn't seem to be a way to accomplish this in either p4v (the GUI) or p4 (CLI). Your best bet is to pass this as a feature request to the excellent perforce support.

like image 154
jhwist Avatar answered Oct 11 '22 16:10

jhwist


I have created a power shell script that could be helpful. It filters for a specific user, date and you can chose the last number of entries you want to search within (this accelerates the command return). The result is shown in a power shell grid window which helps you to sort the result entries. Please feel free to modify variables for your requirements:

$date1 = Get-Date -UFormat "%Y/%m/%d"  #today
#$date1 = "2013/09/11"   #other day
$users = "user1|user2|user3"
$title = "Submitted changes on: "+$date1+" and users: "+$users
$maxLines = 100

Write-host -foregroundcolor 'cyan' $title

$out = (p4 changes -t -s submitted -m 512 | select-string -Pattern $users | select-string -Pattern $date1)

$out | Select-Object LineNumber,Line,Matches | Out-GridView -Title $title -PassThru 

Ihsan

like image 39
Ihsan Qatanani Avatar answered Oct 11 '22 16:10

Ihsan Qatanani


Ok... Just my two cents:

I wanted to filter the submitted list to avoid changelists from other projects on the same P4 server. I tried to filter by user at first, but no luck, just like you.

But! I finally achieved what I wanted by filtering by file path. That way, only my project is visible. I find this quite usefull, as it will show any activity from someone I didn't expect on my project. It's event better than filtering by name. In ma specific case at least.

It doesn't answer the question directly, but it fix the problem I did face :)

like image 1
johan d Avatar answered Oct 11 '22 14:10

johan d