#!/usr/bin/perl -w
# -*- perl -*-
use P4CGI ;
use strict ;
#
#################################################################
# CONFIGURATION INFORMATION
# All config info should be in P4CGI.pm
#
#################################################################
#
# List changes by user and group
#
#################################################################
my $FSPC = &P4CGI::cgi()->param("FSPC") ;
$FSPC = "//..." unless defined $FSPC ;
my $COMPLETE= &P4CGI::cgi()->param("COMPLETE") ;
my @legend ;
unless(defined $COMPLETE) {
push @legend,&P4CGI::ahref("COMPLETE=Yes",
"FSPC=$FSPC",
"Include old users in list") ;
} ;
my $legend = "" ;
$legend = &P4CGI::ul_list(@legend) if @legend > 0 ;
print "", &P4CGI::start_page("View changes by
User(s) and Group(s)",$legend) ;
# Get users
my @users ;
&P4CGI::p4call(\@users, "users" );
my @listOfUsers = sort { uc($a) cmp uc ($b) } map { /^(\S+).*> \((.+)\) .*$/ ; $1 ; } @users ;
my %userCvt = map { /^(\S+).*> \((.+)\) .*$/ ; ($1,$2) ; } @users ;
if(defined $COMPLETE) {
my %allUsers ;
local *P ;
&P4CGI::p4call(*P,"changes $FSPC") ;
while(
) { /.*by (\S+)@/ ; if(exists $allUsers{$1}) { $allUsers{$1} += 1 ; } else { $allUsers{$1} = 1 ; } } ; foreach (keys %allUsers) { if(!exists $userCvt{$_}) { $userCvt{$_} = "Old user: $_ ($allUsers{$_} changes)" ; push @listOfUsers,$_ ; } else { $userCvt{$_} .= " ($allUsers{$_} changes)" ; } } ; } # Get groups my @listOfgroups ; &P4CGI::p4call(\@listOfgroups, "groups" ); print "", &P4CGI::start_table("bgcolor=".&P4CGI::HDRFTR_BGCOLOR()." align=center cellpadding=0 cellspacing=2"), "