Source code control (also called "revision control", "version control" or "code management") is the practice of managing changes to a set of files in a common repository. Files can be checked out from the repository, edited, reverted, merged, checked in or compared with other versions.
Komodo supports common operations for the following SCC systems:
From within Komodo, you can perform the following SCC actions:
Depots, repositories, branches, and projects cannot be created or configured from within Komodo. This must be done using the SCC software directly. Komodo's SCC features become available when files are checked out from the source code repository.
Komodo can work in conjunction with external graphical SCC clients such as TortoiseCVS and TortoiseSVN, and P4Win. However, the command line executables (i.e. cvs
, svn
and p4
) must be present on the local system.
SCC functions are available in the following locations:
The Source Control submenu options are the generally the same regardless of which method is used to access the menu.
Access common source code control commands from the dynamic toolbar, at the left of your screen when using IDE, or on the left side of the "Go To Anything" field on Edit.
The SCC dynamic toolbar button is only visible when your current project is under version control. If the button is not showing while you believe it should be you can try closing and then reopening your project to force a refresh.
Refer to the command descriptions below for more information.
The bottom pane contains a "Version Control" widget which provides quick and easy access to your commit dialog and project and file history, as well as the ability to view results from source code control commands in the Log tab.
This widget only shows information if your current project is under version control. Refresh buttons show in various places to force a refresh when necessary, but generally Komodo should pick up on changes automatically.
The Notifications 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 this tab along with any error messages or warnings generated.
The "Log" tab on the "Version Control" widget also contains output exclusively for source code control commands.
As 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:
Komodo indicates the source code control status of files by coloring the file names. Although the colors may vary by color scheme, they generally follow the following pattern:
green | The file is being added to the source code repository. |
red | The file is being deleted from the source code repository. |
blue | The file has been locally modified. |
normal | The version of the file in your local directory is in sync with the version in the source code repository (i.e. there are no pending updates from the SCC server). | teal | The version of the file in your local directory is out of sync with the version in the source code repository. |
orange | There is a conflict between the version of the file in your local directory and the source file that cannot be resolved by simply syncing your directory with the source code repository. The discrepancy must be manually resolved. |
To 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:
Komodo's Checkout command launches a wizard which steps through downloading a local copy of a set of version controlled files (e.g. a branch).
Set the following options:
Each SCC handler will have different additional parameters which can be set:
Options mentioned above are explained with more detail in the documentation for each SCC handler:
The last step in the wizard shows the command to be executed based on the options chosen in the previous two steps. Click Checkout to run the command. Current status and command output will be displayed as the command runs.
Note: The SCC Checkout wizard does not correctly handle password authentication. SCC checkouts requiring password authentication should be done at the command line. You can do this by copying the command shown in the command line summary and pasting it into a terminal.
Clicking the Source Code Control: Commit button or selecting Commit from the SCC context menu brings up the commit dialog. You can also access this from the Version Control widget.
The left pane shows a list of files for inclusion in the commit. Komodo scans the current directory and all subdirectories under SCC control to populate this list and show the SCC status of each with an icon.
Double click or right click file you would like to include in the check-in, you can hold shift or ctrl so select multiple files. Files that will be committed will be grouped as "Committing".
Clicking the Source Code Control: Push button or selecting Push from the SCC context menu brings up the following dialog box. Note that this dialog is only available for supported distributed version control systems.
The Remote Repo text box at the top determines where the push will go to; Komodo will attempt to determine the most appropriate remote URL, and can also offer suggestions about known remote repositories via the drop-down.
The Branches section (only available for git and mercurial) determines which branches to push. Selecting multiple branches will result in pushing the selected branches to the remote repository. Selecting no branches will push the default branch.
The Tags section (only available for git) determines which tags to push. By default no tags are pushed; selecting one or more tags will add them to the set of things to transmit.
The Options section has additional parameters which can be set, depending on the source control system in use:
A preview of the command line which will be executed can be seen in the Command Line section.
cvs
executable is available in your PATH
or is specified with a full pathname.cvs checkout _repository_ ...
').Komodo should now recognize that the file is under CVS source code control and the SCC menus and status icons should be enabled. If not, click Refresh Status on the File menu (or Ctrl-K, R) to force it to reset.
Some 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.
svn
executable is available in your PATH
or is specified with a full pathname.svn checkout ...
from the command line.Komodo will recognize the files is under Subversion source code control and the SCC menus and status icons should be enabled. If not, click Refresh Status on the File menu (or Ctrl-K, R) to force it to reset.
Some 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.
p4
from the command line (e.g. 'p4 sync _path_
').p4
executable is available in your PATH
or is specified with a full pathname.Komodo should now recognize that the file is under Perforce source code control and the SCC menus and status icons should be enabled. If not, click Refresh Status on the File menu (or Ctrl-K, R) to force it to reset.
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.
Use 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.
Tunneling 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.
Putty 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 PATH
environment variable.
2. Generate the Putty Key
Run the puttygen
utility. Configure as follows:
3. Load and Configure the Putty Authentication Agent
Run the pageant
program. This loads the Putty Authentication Agent into the Windows System Tray.
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 putty
program. Configure as follows:
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.
cmd
in the Windows Run dialog box.pscp _c:\path\to\_public1-openssh.key _username@server.com_:public1-openssh.key
...where _c:\path\to\public1-openssh.key_ specifies the location of the key file created in step two, and _username@server.com_ specifies your username and URL on the remote server. You are prompted to confirm the legitimacy of the host, and may be prompted to enter your password for the server.
putty
program. In the Saved Sessions field, double-click the configuration created in Step 4. This establishes a connection to the server.mkdir ~/.ssh
chmod 700 .ssh
cat ~/public1-openssh.key >> ~/.ssh/authorized_keys
rm ~/public1-openssh.key
chmod 600 ~/.ssh/*
exit
to close the session of the 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.
Use the following additional steps if you are using CVS with Komodo.
7. Check Out a CVS Module
set CVS_RSH=plink
set PLINK_PROTOCOL=ssh
cvs -d :ext:_username@cvs.server.com_:/_repository_name_ co _cvs_module_
...where _username@cvs.server.com_ specifies your username on the CVS server and the URL of the CVS server, _repository_name_ specifies the name of the repository on the server, and _cvs_module_ specifies the name of the module in the chosen working repository.
Login is handled by SSH. The files are copied to the local system. These environment variables do not interfere with non-SSH repositories.
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).
8. Using Komodo and CVS
Before starting Komodo, perform the following steps:
PLINK_PROTOCOL
to "ssh".CVS_RSH
to "plink".Ensure Pageant Is Running: Run the pageant
program to enable the authentication agent. Ensure that the private1.key is loaded.
You can also execute Pageant and load the key via a batch file. For example:
C:\PuTTY\pageant.exe c:\path\to\private.key c:\path\to\private2.key
Use the following additional steps if you are using Subversion with Komodo.
7. Check Out a Subversion Repository
svn checkout svn+ssh://_svn.server.com_/_repository_path/module/_ _local_path_
...where _svn.server.com_ specifies the server domain name of the Subversion server, _repository_path/module_ specifies the path of the repository on the server, and _local_path_ specifies the preferred location on your local system for your copy of the repository. The _local_path_ can be ommited, in which case the local path is the last part of the repository_path.
Login is handled by SSH. The files are copied to the local system.
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).
8. Using Komodo and Subversion
Set the following environment variables in Environment Preferences:
PLINK_PROTOCOL=ssh
SVN_SSH=c:/path/to/plink.exe -batch
Specify the full path to plink.exe
using forward slashes "/" or escaped back slashes "\". The -batch
argument is used to prevent plink from prompting for user input. You can specify a specific private key by adding "-i C:/path/to/private_keyfile
". For example:
SVN_SSH="c:/path/to/plink.exe" -i "c:/path/to/private_keyfile"
You can use the Subversion configuration file instead of setting the SVN_SSH environment variable:
[tunnels]
ssh = $SVN_SSH plink.exe
This permits configuration of different connection types. The config file is located in the Subversion directory, typically inside the Application Data area of the user's profile directory (eg. C:\Documents and Settings\USERNAME\Application Data\Subversion). See the Subversion documentation for more information.
If you use "plink = $SVN_SSH plink.exe" in the tunnels section of the config file, use "svn+plink" for your checkout url rather than "svn+ssh".
Run pageant
to enable the authentication agent. Ensure that the private1.key is loaded. You can start Pageant and load the key using a batch file. For example:
C:\PuTTY\pageant.exe c:\path\to\private.key c:\path\to\private2.key
To configure CVS to use SSH, refer to http://forrest.apache.org/docs/howto/cvs-ssh/howto-cvs-ssh.
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:
exec ssh-agent bash
.ssh-add
/path/to/public/key (e.g. 'ssh-add /.ssh/id_rsa.pub
')cvs -d :ext:_username@cvs.server.com_:/_repository_name_ co _cvs_module_
...where _username@cvs.server.com_ specifies your username on the CVS server and the URL of the CVS server, _repository_name_ specifies the name of the repository on the server, and _cvs_module_ specifies the name of the module in the chosen working repository.
_/path/to/komodo_/bin/komodo
After completing the configuration steps above, follow these steps to open Komodo with CVS-SSH enabled:
exec ssh-agent bash
.ssh-add
/path/to/public/key (e.g. 'ssh-add ~/.ssh/id_rsa.pub')_/path/to/_komodo/komodo.exe
Subversion determines when to use SSH depending on how you check out the modules. If you use http:// or file:/// URIs, Subversion will not use SSH.
To use subversion with SSH, do the following before starting Komodo:
exec ssh-agent bash
.ssh-add
/path/to/public/key (e.g. 'ssh-add ~/.ssh/id_rsa.pub
')svn checkout svn+ssh://_svn.server.com_/_repository_path/module/_ _local_path_
...where _svn.server.com_ specifies the server domain name of the Subversion server, _repository_path/module_ specifies the path of the repository on the server, and _local_path_ specifies the preferred location on your local system for your copy of the repository. The _local_path_ can be omitted, in which case the local path is the last part of the repository_path.
Refer to http://svnbook.red-bean.com/en/1.0/ch06s03#svn-ch-6-sect-3.3 for more detailed instructions, including information on configuring svn+ssh to be non-interactive (i.e. no password prompt).
Documentation Archive (older versions)
© 2017 ActiveState Software Inc. All rights reserved. ActiveState®,
Komodo®, ActivePerl®, ActivePython®, and ActiveTcl® are registered
trademarks of ActiveState.
All other marks are property of their respective owners.