[p4] Cannot delete user

Peter Stephenson pws at csr.com
Fri Oct 6 09:16:32 PDT 2006


"Marshall, Tony [CIB-IT]" wrote:
> I want to delete a user from Perforce, but Perforce reports that the
> user has opened files. However, it also reports no pending changes for
> the user.
>  
> e.g.
>  
> > p4 user -d -f <user> 
> User <user> has file(s) open on 1 client(s) and can't be deleted.
>  
> > p4 changes -s pending -u pg50976
> (no pending changes displayed)
>  
> So how do I delete the user?

You can find all applicable clients with something like...

p4 -ztag clients | grep -C3 'Owner <usr>'

...then you can find what's open on each of them...

p4 opened -C <that-client>

In fact, the following ought to do it...

for client in `p4 -ztag clients | grep -C3 '^\.\.\. Owner <user>' |
  awk '/^\.\.\. client/ { print $3 }'`; do
  p4 opened -C $client
done

-- 
Peter Stephenson <pws at csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


More information about the perforce-user mailing list