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.
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.
For Mac OS X:
~/Library/Preferences/com.perforce.p4v/ApplicationSettings.xml
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>
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...
In Later versions of Perforce (at least Perforce Visual Client/NTX64/2012.1/500245
) the files is stored in
{UserProfileFolder}\.p4qt\ApplicationSettings.xml
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.
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.
精彩评论