Source Code Control (Komodo Pro)"Source code control" refers to the practice of storing files containing program source code (and other project artifacts) in a common repository. Using source code control (SCC), multiple developers can work on the same project (including the same project file) at the same time. The SCC repository can be queried for a detailed listing of the changes that occurred each time a file was edited. Files under source code control that are open for editing can also be reverted to their previous state. Komodo's SCC integration works in conjunction with the CVS, Subversion and Perforce source code control systems. Depots, repositories, branches, and projects cannot be created or configured from within Komodo. This must be done using the SCC software itself. Komodo's SCC features become available when files are checked out from the source code repository. From within Komodo, you can perform the following SCC actions:
Additionally, files under Perforce control are recognized by Komodo even when they are not open for edit. They can be opened via the File menu, SCC context menus (locations described below), or the SCC toolbar. Komodo is intended to work in conjunction with these SCC programs; it does not replace them. TortoiseCVS and TortoiseSVN are useful tools for managing files under source code control from within Windows Explorer. Perforce provides P4Win, a graphical client for Windows used to view and manage files in a SCC repository. Komodo SCC functions are accessible from the following locations:
The Source Control submenu options are the same regardless of which method is used to access the menu. Using Source Code ControlSCC Toolbar, Menus and Output TabSource Code Control ToolbarAccess common source code control commands from the SCC Toolbar at the top of the Komodo workspace. Refer to the command descriptions below for more information. The toolbar commands only apply to the file currently active in the Editor Pane.
Source Code Control MenusTo access source code control functions, select File|Source Control. Invoke source code control context menus by right-clicking files or folders in the following areas:
Source Code Control Output Tab and Status MessagesThe SCC Output tab is located in the Bottom Pane of the Komodo workspace. As you execute source code control commands, such as editing or checking in files, details of the commands are displayed on the SCC Output tab. Error messages and warnings are also displayed on the SCC Output tab. Additionally, error messages and warnings are displayed on the status bar in the bottom left corner of the Komodo workspace.
Source Code Control CommandsAs described above, source code control commands are invoked from the toolbar, the File menu and the Source Control context menu. The following commands are available, depending on the context:
Under Perforce, to open files for edit from within a Komodo project, you must first add files to the project using options on the Project menu. To accomplish the same under CVS, use the following procedure:
File Status IconsIf Perforce, CVS or Subversion is enabled in Komodo's Preferences, the status of files in the source code repository is indicated by icons that appear on file tabs in the Editor Pane and next to files and projects on the Projects tab. The icons can appear in a variety of combinations, depending on the status of the file and where they are displayed in the Komodo workspace. For example, a green circle next to a padlock on a tab in the Editor Pane indicates that the file is open for edit and that the version of the file in your local directory is in sync with the version in the source code repository.
Refresh StatusTo refresh the SCC status of the current file do one of the following:
To refresh the SCC status of an entire folder, do one of the following:
Configuring Source Code Control IntegrationConfiguring CVSInstalling the CVS ExecutableTo view the location of the CVS executable files found on your system and to determine which executable is used, select Edit|Preferences|Source Code Control|CVS. If CVS is not properly configured, or if the CVS executable file you have is incompatible with Komodo, the CVS Source Code Control page in Komodo Preferences displays a message advising that CVS integration is disabled. To begin configuring CVS, click Download CVS and follow the instructions on the ASPN web site. The CVS executable must be located in a directory specified in your system's PATH environment variable, or you will need to configure the path to the executable in Komodo's preferences. On Windows 98 and Me, you must configure a
CVS Over SSHSome CVS repositories (e.g. SourceForge) will only support CVS access over SSH (secure shell). When accessing these repositories, an SSH client is required. See Configuring SSH Support for CVS and Subversion below for details on configuring SSH support.
Configuring SubversionInstalling the Subversion ExecutableTo view the location of the Subversion executable files found on your system and to determine which executable is used, select Edit|Preferences|Source Code Control|Subversion. If Subversion is not properly configured, the Subversion Source Code Control page in Komodo Preferences displays a message advising that Subversion integration is disabled. To begin configuring Subversion, click Download Subversion and follow the instructions on the ASPN website. The Subversion executable must be located in a directory specified in your system's PATH environment variable, or you will need to configure the path to the executable in Komodo's preferences. Komodo will only contact the Subversion server when Refresh Status is clicked for the a file or folder
Subversion Over SSHSome Subversion repositories only support Subversion access over SSH (secure shell). When accessing these repositories, an SSH client is required. See Configuring SSH Support for CVS and Subversion below for details on configuring SSH support.
Configuring PerforceEnsure that the command-line version of Perforce ("P4") is correctly installed
and functional before working with a Perforce repository within Komodo. The
Users of Perforce's P4CONFIG feature may find that Komodo's source code control doesn't work unless Komodo is started from within the client view of the Perforce repository.
Configuring PreferencesUse the Source Code Control page in Komodo's Preferences to configure Source Code Control integration. To open the Komodo Preferences dialog box, select Edit|Preferences.
Configuring SSH Support for CVS and SubversionTunneling your CVS or Subversion connections over SSH can provide an added level of security for your repository access. CVS and Subversion use very similar methods for tunneling over an SSH connection. On Windows, download and install Putty or Cygwin to provide SSH support. Linux and OS X distributions typically include SSH support. This is a basic guideline for configuring CVS and Subversion to use SSH, however, because server configurations can vary, you should consult the documentation for the control system you are using, or request help from you system administrator. The use of Pageant (on Windows) or ssh-agent (OS X and Linux) with Komodo is strongly recommended. Installing and Configuring Putty on WindowsPutty is a free SSH, Telnet and Rlogin client for Windows. 1. Install Putty Download Putty (version 0.52 or greater) and associated programs from: http://www.chiark.greenend.org.uk/~sgtatham/putty/To connect to a server via SSH, the following programs are required:
Ensure that the directory where Putty is installed is specified in your
system's 2. Generate the Putty Key Run the
3. Load and Configure the Putty Authentication Agent Run the Right-click the Pageant icon in the Windows System Tray. Select Add Key. Navigate to the directory where you saved the public and private keys in the previous step, and select the file private1.key.ppk. 4. Configure Putty To Use Pageant Run the
5. Store the Public Key on the Server You must store the public key file generated in step 2 (public1-openssh.key) on the CVS or Subversion server.
6. Test the Configuration Restart Putty. In the Saved Sessions field, double-click the configuration created in Step 4. You should not be prompted to log in. If you are, the configuration failed. Review the steps above and ensure that they were completed correctly. Using CVS with Putty on WindowsUse the following additional steps if you are using CVS with Komodo. 7. Check Out a CVS Module
Ensure that these variables are permanently configured in your system environment (for example, by adding them to the autoexec.bat file or configuring them in the system properties). Reboot Windows Me and 9x systems after adding environment variables. 8. Using Komodo and CVS Before starting Komodo, perform the following steps:
If you are running Windows 9x or Windows Me, permanently configure these variables in the environment (for example, by adding them to the autoexec.bat file) and reboot before proceeding.
Using Subversion with Putty on WindowsUse the following additional steps if you are using Subversion with Komodo. 7. Check Out a Subversion Repository
Ensure that these variables are permanently configured in your system environment (for example, by adding them to the autoexec.bat file or configuring them in the system properties). Reboot Windows Me and 9x systems after adding environment variables. 8. Using Komodo and Subversion Before starting Komodo, perform the following steps:
If you are running Windows 9x or Windows Me, permanently configure these variables in the environment (for example, by adding them to the autoexec.bat file) and reboot before proceeding.
Configuring CVS with Windows/Cygwin-SSH or Linux/SSHTo configure CVS to use SSH, refer to http://xml.apache.org/forrest/community/howto/cvs-ssh/howto-cvs-ssh.html. On all platforms, create an environment variable as follows: CVS_RSH=ssh CVS determines when to use SSH, depending on how you check out the modules. If you use the "cvs login" method with the "pserver" protocol, CVS does not use SSH, even if CVS_RSH=ssh is set in the environment. On Windows, also configure the cygwin SSH Agent as follows:
After completing the configuration steps above, follow these steps to open Komodo with CVS-SSH enabled:
Configuring Subversion with Windows/Cygwin-SSH or Linux/SSHTo configure Subversion to use SSH, refer to http://svnbook.red-bean.com/en/1.0/index.html. Subversion determines when to use SSH, depending on how you check out the modules. If you use an HTTP or FILE URI, Subversion will not use SSH. Subversion configurations are very customizable and may not exactly match the examples below. On Windows, configure the Cygwin SSH Agent as follows:
After completing the configuration steps above, follow these steps to open Komodo with Subversion-SSH enabled:
|