How can I clear the list of recent connections from Perforce P4V?

元气小坏坏 提交于 2019-12-04 10:18:00

问题


Perforce P4V keeps a list of recent connections under the menu 'Connections -> Recent Connections'. We have moved our Perforce depot files to a different server so I still have the old connection listed but when it is selected it errors as it can't connect. Is there a way to clear these old connections?

I am using Perforce Visual Client/NTX86/2010.1/271261.


回答1:


Are you in Linux/Unix? If so, in your home directory is a .p4qt/ directory. If Windows, I'm sure you have something similar.

You should have a file called appsettings.xml or ApplicationSettings.xml. It should have something like this:

 </PropertyList>
 <StringList varName="Recent Connections">
 <String>server:1666, bob, bob_workspace</String>
 <String>server:1666, steve, steve_ws</String>
 <String>server:1666, joe, joe_workspace</String>
 </StringList>

Please note, I do not know XML, but you should be able to clear this out of your file. Or, you can delete this file and have it be recreated if you don't mind some preferences being reset.




回答2:


On Windows7 and P4 2011.1 it's slightly different;

%USERPROFILE%\.p4qt\ApplicationSettings.xml

You can edit the recent connections in this attribute;

<StringList varName="RecentConnections">
    <String>192.168.0.1:1337, Username, Workspacename</String>
    <String>192.168.0.1:1337, Username</String>
</StringList>



回答3:


For Mac OS X:

~/Library/Preferences/com.perforce.p4v/ApplicationSettings.xml




回答4:


In Later versions of Perforce (at least Perforce Visual Client/NTX64/2012.1/500245) the files is stored in

{UserProfileFolder}\.p4qt\ApplicationSettings.xml



回答5:


Peforce support suggest removing the settings folder (%USERPROFILE%.p4qt) before starting P4V but this would remove all custom settings (including custom tools).

Using Windows the .p4qt/ folder is in the user profile folder.

Clearing the outdated connection lines and restarting P4V had the desired result.




回答6:


Do NOT delete the entire folder!!!

For windows, go to: %USERPROFILE%.p4qt\0001Clients\WorkspaceSettings.xml

Then you will find some items:

<StringList varName="RecentlyUsedWorkspaces">
    <String>workspace1.test</String>    
    <String>workspace2.test</String>
    <String>workspace3.test</String>
    <String>workspace4.test</String>
 </StringList>

You can delete from this list.




回答7:


On windows, the path is C:\Users\userName\.p4qt\ApplicationSettings.xml, and you should quit P4V first, then edit the ApplicationSettings.xml, and remove those items in:

<StringList varName="RecentConnections">
    <String>192.168.0.1:1337, Username, Workspacename</String>
    <String>192.168.0.1:1337, Username</String>
</StringList>

Reopen P4V and you will find the other recent connections is gone...

If you are using the P4VS plugin for Visual Studio, then you need to open C:\Users\yourName\AppData\Roaming\Perforce\P4VS\LocalSettings.ini

Delete the other items in:

<RecentConnections maxCapacity="5" type="Perforce.P4VS.MRUList">
    <RecentConnections type="Perforce.P4VS.ConnectionData">
            <ServerPort type="string">192.168.0.1:1337</ServerPort>
            <UserName type="string">yourUserName</UserName>
            <Workspace type="string">yourWorkSpace</Workspace>
    </RecentConnections>
    <RecentConnections type="Perforce.P4VS.ConnectionData">
            <ServerPort type="string">192.168.0.2:1337</ServerPort>
            <UserName type="string">yourUserName2</UserName>
            <Workspace type="string">yourWorkSpace2</Workspace>
    </RecentConnections>
    <RecentConnections type="null"/>
    <RecentConnections type="null"/>
    <RecentConnections type="null"/>
</RecentConnections>

Now, its clean...



来源:https://stackoverflow.com/questions/4316173/how-can-i-clear-the-list-of-recent-connections-from-perforce-p4v

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!