I am trying to delete an old user from our perforce installation. A previous admin had deleted all their active workspaces / clients so we should be able to now delete the user, however when i run
我正在尝试从perforce安装中删除旧用户。之前的管理员已经删除了所有活动工作区/客户端,因此我们现在应该能够删除用户,但是当我运行时
p4 user -f -d auser
User auser has file(s) open on 1 client(s) and can't be deleted.
However auser no longer has any associated clients, and if I filter the pending changelist view in P4V it shows the user as having one file checked out in the default changelist but no client is specified. Even if I log in as the user I dont seem to be able to revert or do anything with the file. Any hints how I might solve this?
但是,auser不再具有任何关联的客户端,如果我在P4V中过滤挂起的更改列表视图,则会向用户显示在默认更改列表中检出一个文件但未指定客户端。即使我以用户身份登录,我似乎也无法恢复或对文件执行任何操作。有什么提示我可以解决这个问题吗?
2 个解决方案
#1
While both of these commands returned nothing:
虽然这两个命令都没有返回:
$ p4 clients -u <USER>
$ p4 changes -s pending -u <USER>
This command showed me which file was open:
此命令显示我打开了哪个文件:
$ p4 opened -u <USER>
//depot/path/to/file#1 - edit default change (text) by <USER>@<CLIENT>
This command doesn't work:
此命令不起作用:
$ p4 -u <USER> -H <CLIENT> revert -k //depot/path/to/file
//depot/path/to/file#1 - belongs to user <USER>, not reverted
Deleting the client does:
删除客户端会:
$ p4 client -o <CLIENT> > <CLIENT>.txt
$ p4 client -d -f <CLIENT>
$ p4 opened -u <USER>
File(s) not opened anywhere.
FTW! \o/
If you need to, you can then recreate the client with:
如果需要,您可以使用以下命令重新创建客户端:
$ p4 client
Then read in the <CLIENT>.txt
file you created with the output of p4 client -o <CLIENT>
and save it.
然后读入您使用p4 client -o
More here: http://answers.perforce.com/articles/KB_Article/Reverting-Another-User-s-Files
更多信息:http://answers.perforce.com/articles/KB_Article/Reverting-Another-User-s-Files
#2
Solved.
A bit weird but this is what I did. I got the details of the default changelist that contained the file. It had the workspace name which was the name of a machine. I logged into the machine and then into perforce as the user. At this point I could see the pending changelist and revert the file. Now I can delete the user.
有点奇怪,但这就是我做的。我得到了包含该文件的默认更改列表的详细信息。它有工作区名称,它是机器的名称。我登录到机器然后以用户身份进入perforce。此时我可以看到挂起的更改列表并还原文件。现在我可以删除用户了。
How did this happen?
这怎么发生的?
I think what must of happened was a confusion of clients. A while back I changed the owner of quite a few clients on that machine (its the build server) and some of these clients must have had open files for the old user. This is the only explanation I can come up with.
我认为必然发生的是客户的困惑。前段时间我改变了该机器上不少客户端的所有者(它的构建服务器),其中一些客户端必须为旧用户打开了文件。这是我能想到的唯一解释。
#1
While both of these commands returned nothing:
虽然这两个命令都没有返回:
$ p4 clients -u <USER>
$ p4 changes -s pending -u <USER>
This command showed me which file was open:
此命令显示我打开了哪个文件:
$ p4 opened -u <USER>
//depot/path/to/file#1 - edit default change (text) by <USER>@<CLIENT>
This command doesn't work:
此命令不起作用:
$ p4 -u <USER> -H <CLIENT> revert -k //depot/path/to/file
//depot/path/to/file#1 - belongs to user <USER>, not reverted
Deleting the client does:
删除客户端会:
$ p4 client -o <CLIENT> > <CLIENT>.txt
$ p4 client -d -f <CLIENT>
$ p4 opened -u <USER>
File(s) not opened anywhere.
FTW! \o/
If you need to, you can then recreate the client with:
如果需要,您可以使用以下命令重新创建客户端:
$ p4 client
Then read in the <CLIENT>.txt
file you created with the output of p4 client -o <CLIENT>
and save it.
然后读入您使用p4 client -o
More here: http://answers.perforce.com/articles/KB_Article/Reverting-Another-User-s-Files
更多信息:http://answers.perforce.com/articles/KB_Article/Reverting-Another-User-s-Files
#2
Solved.
A bit weird but this is what I did. I got the details of the default changelist that contained the file. It had the workspace name which was the name of a machine. I logged into the machine and then into perforce as the user. At this point I could see the pending changelist and revert the file. Now I can delete the user.
有点奇怪,但这就是我做的。我得到了包含该文件的默认更改列表的详细信息。它有工作区名称,它是机器的名称。我登录到机器然后以用户身份进入perforce。此时我可以看到挂起的更改列表并还原文件。现在我可以删除用户了。
How did this happen?
这怎么发生的?
I think what must of happened was a confusion of clients. A while back I changed the owner of quite a few clients on that machine (its the build server) and some of these clients must have had open files for the old user. This is the only explanation I can come up with.
我认为必然发生的是客户的困惑。前段时间我改变了该机器上不少客户端的所有者(它的构建服务器),其中一些客户端必须为旧用户打开了文件。这是我能想到的唯一解释。