How Can One Insure The Deployment Settings Are Retained?

A bit of backstory ...

I have two (someteims three) different work environments that I use PhpStorm in.
I use GitHub for the VCS with both public and private repos.
Aside from the computer username, the same WAMP version is used for the stack.

Now, with my workflow, to the issue at hand ...

  1. I open an existing project.
  2. Click the "Update Project" button
  3. Get changes
  4. Almost everytime (8 or 9 out of 10) I will be presented with the "Merge" window if there are file changes (this is typically the .idea file only)
  5. Choose any of the three options (Yours, Theirs, Merge)
  6. Re-start project
  7. Lose deployement server details (read: all details on the "Mappings" and "Excluded Paths" tabs)


Any ideas to consistently *not* have to re-enter all the server details (I deploy to four different servers for most projects)?

2 comments

Hi Edward,

.idea/workspace.xml should not really be included in VCS as it includes configuration details that can be specific to this machine only.

Accordingly to the official help page, "All the settings files in the .idea directory should be put under version control except the workspace.xml, which stores your local preferences. The workspace.xml file should be marked as ignored by VCS"

Any ideas to consistently *not* have to re-enter all the server details (I deploy to four different servers for most projects)?

As I understand this correctly it happens after you overwrite local .idea/workspace.xml with remote copy and you are losing data on Mappings and Exclusions tabs. If so:


From http://youtrack.jetbrains.com/issue/WI-10348:

Deployment servers (Connection tab) are IDE-wide (configured "per machine"; the same for all projects). All other tabs (Mappings , Excluded paths) are project specific (stored in .idea subfolder).

They are reset because deployment server ID's are different on each machine. You can compare webServers.xml config file from multiple machines and see what differs there (for example, on Windows 7 that file will be located in C:\Users\USERNAME\.WebIde50\config\options folder).

To make sure that such mappings are not getting lost, you need to sync those IDs somehow.  For example:

  • by manually syncing entries in aforementioned webServers.xml
  • via "File | Export Settings ..." on one machine and then "File | Import Settings..." on another computer


Once Deployment entries will have the same IDs on all involved machines, the details will not be lost even if workspace.xml will be shared.

0

Thanks, I will give the export/import idea a try ... and mark the workspace.xml file as ignored (if it is not already).

0

Please sign in to leave a comment.