Клиент Perforce P4: как перенести мои рабочие пространства и закладки на новый компьютер

17259
Judy Bogart

У меня много клиентских спецификаций и рабочих областей, определенных для разных серверов Perforce. Я получил новый компьютер и установил P4V-клиент, но я не вижу никаких моих клиентских спецификаций, потому что они все специфичны для старого компьютера. Есть ли способ перенести эту информацию без кропотливого воссоздания каждой спецификации клиента и рабочего пространства в новой системе? Я использую интерфейс, а не интерфейс командной строки.

12
Вы установили только клиент командной строки P4 или P4V? jimbojw 11 лет назад 0

3 ответа на вопрос

10
Craig

Workspaces

The 'host' field in the workspace limits its use to that computer. Changing the host field to blank or more preferably the name of the new computer will allow it to be used on the new computer, however you must also either:

  1. copy all the data from the old root to the same directory on the new computer, assuming you wish to use the same root path, or
  2. perform a forced full sync

doing this ensures the workspace is in sync with the server.

To do this, click the 'workspace' icon (picture of a terminal screen), click the cancel filter icon to view all workspaces (top right of the panel, a cross over a funnel). Right click on the desired workspace and select 'edit workspace' and change the host field (in advanced tab) to the name of the new computer, or clear the host field. After doing this, the 'switch to workspace' option will appear on the context menu.

To find the name of the new computer select 'create a new workspace' from Connection menu and note the name of the 'host' field and then cancel the menu.

Bookmarks

P4V does not have an easy method for transferring bookmarks, however bookmarks are stored in bookmarks.xml found in a directory:

C:\Users\loginname\.p4qt\nnnnClients\ 

If you only have one directory called '0001Clients' you're in luck, but you may have more than one of these directories so it may require searching for the right bookmarks.xml file. Once you find the right one, transfer it to the new computer which is likely to only have one of these directories and the bookmarks will appear after reloading the client.

Процедура редактирования рабочей области также работает, если вы изменили имя хоста компьютера. Dave Andersen 10 лет назад 0
1
Carl

Bookmarks

Craig is correct, but here's a way to find the right xxxxClients directory both on the source and the target computer (you might very well have several of them on the target computer as well).

Look in connectionmap.xml in C:\Users\loginname\.p4qt and search for you user name. It will give you the xxxx number and the directory where you can find (source) and then overwrite (target) the existing bookmarks.xml.

(Reloading the client was not necessary for me - the bookmarks showed up right away.)

-2
Nagendra Reddy

Шаги, представленные в ответе Крейга, сработают, если вы переходите с Windows на Windows. Но если ваш новый компьютер является MacBook, то новое место ./Users/<User ID>/Library/Preferences/com.perforce.p4v