Blog  |  Contact Us

Search the Knowledgebase Browse by Category
Surround SCM IntelliJ IDEA and WebStorm Integration
Last Updated
2nd of August, 2011
Surround SCM supports integration with IntelliJ IDEA and WebStorm. See Surround SCM Third-Party Integrations for supported platforms and versions.

This article includes information about installing the integration plug-in, sharing projects, performing Surround SCM actions, configuring Surround SCM preferences, and troubleshooting.

Note: The following steps were tested with Surround SCM 2010.1.0 and IntelliJ IDEA 9.0.2. The steps for using IntelliJ IDEA are the same for WebStorm.

Installing the plug-in

The integration plug-in is installed during the Surround SCM Client installation. If you did not install it, rerun the Surround SCM installer and select the IntelliJ IDEA plug-in option. Make sure you select the IntelliJ IDEA version you are using.

You can also install the plug-in from IntelliJ IDEA.
  1. Choose File > Settings. The Settings dialog box opens.
  2. Select Plugins.
  3. Right-click Surround SCM and choose Download and Install.

    intellijplugins.png
  4. Click Apply. The plug-in is downloaded and installed.
  5. Restart IntelliJ IDEA when installation is complete.

Sharing projects

Before you can perform Surround SCM actions from IntelliJ IDEA, you need to associate the project with Surround SCM.
  1. Open the project in IntelliJ IDEA.
  2. Select the project root node and choose Version Control > Enable Version Control Integration. The Enable Version Control Integration dialog box opens.

    intellijenablevcint.png
  3. Select Surround SCM and click OK.
  4. Right-click the project root node and choose Surround SCM > Work Online. You may be prompted to log in and associate the project with Surround SCM.
  5. Click Fix. The Surround SCM Repository Browser opens.

    Note: Click Ignore if you do not want to associate the project, but want to be prompted when you open another project. Click Ignore All if you do not want to associate any projects when this instance of IntelliJ IDEA is open.

    intellijrepobrowser.png
  6. Select the repository to associate the project with or click Create Repository to create a new repository for the project.

    Note: If an existing repository is selected, the working directory must be the project directory. Right-click the repository and choose Set Working Directory to change the working directory. Creating a new repository automatically assigns the project directory as the working directory.

  7. Click OK to close the repository browser. The integration is ready to use.

Performing Surround SCM actions

To perform Surround SCM actions, right-click the files you want to work with, choose Surround SCM, and then choose an action.

Adding files
You must add files individually to Surround SCM because you cannot add packages. You can also add multiple files at once.
  1. Select the files you want to add to source control.
  2. Right-click and choose Surround SCM > Add. The Advanced Add Options dialog box opens.
  3. Select any options and click OK. The files are added to Surround SCM.
Getting files
Get files when you want to view a file but do not need to make any changes.
  1. Select the files you want to get.
  2. Right-click and choose Surround SCM > Get. The Advanced Get Options dialog box opens.

    Note: To get a copy of all files in the project, right-click the project and choose Surround SCM > Pull Project.
  3. Select any options and then click OK to get the files.
Checking out files
Check out files when you want to modify them.
  1. Select the files you want to check out.
  2. Right-click and choose Surround SCM > Check Out. The Advanced Check Out Options dialog box opens.
  3. Select any options and click OK. The files are checked out.
Undoing check out
If you check out and modify a file and then decide you do not want to save the changes, you can undo the check out. This discards any changes made to the file and checks it back in to the server.
  1. Select the files you want to undo check out for.
  2. Right-click and choose Surround SCM > Undo Check Out. The Advanced Undo Check Out Options dialog box opens.
  3. Click OK. The files are no longer checked out.
Checking in files
Check in updates the file with changes and makes it available to other users.
  1. Select the files you want to check in.
  2. Right-click and choose Surround SCM > Check In. The Advanced Check In Options dialog box opens.
  3. Click OK. The files are checked in.
Viewing file history
You can view a source file's history and work with historical file versions.
  1. Right-click the file you want to view history for and choose Surround SCM > History. The History dialog box opens. You can view historic version information and diff or get versions of the file.
  2. Click Close to close the file history.
Viewing file properties
You can view Surround SCM file properties from IntelliJ IDEA.
  1. Right-click the file you want to view properties for and choose Surround SCM > Properties.
  2. Select Surround SCM to view file information.
Viewing file differences
You can compare a local file with the latest revision in Surround SCM.
  1. Right-click the file and choose Surround SCM > Differences. The compare editor displays any differences between the files.
Viewing repository differences
You can compare a local project folder and the corresponding Surround SCM repository.
  1. Right-click the project folder and choose Surround SCM > Differences. The Repository Differences dialog box opens. You can see if any files are missing locally or from Surround SCM. You can also see if files are out of sync between the Surround SCM repository and the local project folder.
Renaming files
  1. Right-click the file you want to rename and choose Surround SCM > Rename. The Rename File dialog box opens.
  2. Enter a New Name.
  3. Optionally enter any comments.
  4. Click OK. The file is renamed in Surround SCM. You are prompted to rename the file in the project.
  5. Click Yes to rename the file and update the project to point to the new file. If you do not rename the project file, you cannot work with it unless you add it to Surround SCM or manually rename it.
Refreshing file status
If you make changes to a file outside of IntelliJ IDEA, you can refresh the file to update the status. For example, if you check out a file from the Surround SCM Client, it is not displayed as checked out in IntelliJ IDEA unless you refresh the file status.
  1. Right-click the file and choose Surround SCM > Refresh File Status. The file status is refreshed.
Removing files
You can remove files from Surround SCM control.
  1. Right-click the file you want to remove and choose Surround SCM > Remove. The Advanced Remove Options dialog box opens.
  2. Select Destroy if you want to permanently delete the selected file from Surround SCM.
  3. Optionally enter any comments.
  4. Click OK. The file is removed.
Disconnecting a project
IntelliJ IDEA does not have an option to disconnect from source control. Disconnecting must be performed manually. Files are not removed or destroyed from Surround SCM when you disconnect a project.
  1. Select the project root node.
  2. Choose File > Settings.
  3. Set the version control provider for the project to None.
If you want to remove all references to Surround SCM, you need to remove the hidden files that Surround SCM uses to keep track of files in working directories.
  1. Close IntelliJ IDEA.
  2. Browse to the project directory.
  3. Locate and delete the .MySCMServerInfo file.
  4. Browse to any subdirectories or other directories where files used by the project exist and delete the .MySCMServerInfo files.
Note: When you open IntelliJ IDEA, files may still have a lock icon next to them because they are still read only. The local icon is not removed until the read-only attribute is removed from the files.

Configuring Surround SCM preferences

You can configure options for the Surround SCM integration.
  1. Choose File > Settings.
  2. Expand Version Control and then expand VCSs.
  3. Select Surround SCM. The Surround SCM preferences are displayed.

    intellijvcsettings.png
  4. Make any changes and click OK.

Troubleshooting

Surround SCM is not displayed in the Version Control menu or Version Control settings and the Surround SCM shortcut menu is not available

Following are common causes and solutions.
  • The Surround SCM plug-in is not installed. Rerun the Surround SCM Client installer or install the plug-in from IntelliJ IDEA.

  • You are using an unsupported version of IntelliJ IDEA. See Surround SCM Third-Party Integrations for supported platforms and versions.
Most Surround SCM menu commands are not enabled

Following are common causes and solutions.
  • The project is not configured correctly. Make sure the project points to a valid branch/repository. The branch/repository must exist on the Surround SCM Server you are connecting to.

  • IntelliJ IDEA cannot connect to the Surround SCM Server. Make sure the Surround SCM Server is running and that your username and password are correct.

  • The local .MySCMServerInfo file is out of sync. IntelliJ IDEA uses the .MySCMServerInfo file to determine where to look for files in Surround SCM. Go to the project directory and make sure the .MySCMServerInfo file data points to the correct branch/repository. If it points to an incorrect branch/repository, delete it and then refresh the project status to regenerate the .MySCMServerInfo file.  
You cannot add files to Surround SCM from IntelliJ IDEA

Following are common causes and solutions.
  • The Surround SCM integration is not configured correctly for the IntelliJ IDEA project. Make sure the project points to a valid branch/repository. Surround SCM may guess where you want to add the files based on the information in the .MySCMServerInfo file. However, the add cannot be completed if the .MySCMServerInfo file does not exist.

  • The IntelliJ IDEA project configuration points to the wrong branch. This can be an issue if you maintain the IntelliJ IDEA local project files in Surround SCM and then branch the repository that contains the project files. The local files point to the old branch, which is where the files are added. Configure IntelliJ IDEA to point to the correct branch and then add the files to Surround SCM.
Attachments
No attachments were found.
Related Articles

© 2012 Seapine Software, Inc., All rights reserved.