Source Code Control (Komodo Pro)
Komodo's Source Code Control integration works in conjunction with
CVS and
Perforce. From within
Komodo, you can perform most common SCC actions, such as:
- checking files out of the source code repository
- comparing files in the editor against their repository versions ("diff")
- submitting files back to the repository
Source code control functions are accessible from the
following locations:
- Toolbox context menu: right-click a file in the
Toolbox to access the
Source Control menu options. Source code control functions
can also be performed on Folders in the Toolbox; right-click a folder and
select Source Code on Contents to access the menu.
- Project Manager context menu: right-click a file in the
Project
Manager to access the Source Control menu options.
Source code control functions can also be performed on Folders in the Toolbox;
right-click a folder and select Source Code on Contents to
access the menu.
- Editor pane: right-click a file in the Editor pane to
access the Source Control menu options.
- File Name tab: right-click the file name tab above the
Editor pane to access the Source Control menu options.
- File menu: select the Source Control
option from the File menu.
The Source Control menu options are the same regardless
of which method is used to access the menu.
Komodo supports the version of cvs.exe that can be obtained from
http://www.cvshome.org. Other
versions of CVS, such as TortoiseCVS, are not supported. To determine the
version of cvs.exe in your system, enter cvs -v
at a command prompt. If this returns
Concurrent Versions System (CVSNT) rather than
Concurrent Versions System (CVS) , your CVS version is not
compatible with Komodo.
The CVS executable must be located in a directory that is specified in your
system's PATH environment variable.
On Windows 98 and Me, you must configure a HOME environment
variable, for example "HOME=c:\ ". Reboot before proceeding.
1. Install Putty
Komodo requires Putty version 0.52 or greater. Putty and the associated
programs can be downloaded from:
http://www.chiark.greenend.org.uk/~sgtatham/putty/
You will require the following Putty programs:
putty.exe
puttygen.exe
pageant.exe
pscp.exe
plink.exe
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:
- Parameters: select "SSH2 RSA" or "SSH2 DSA" (it
doesn't matter which).
- Generate: click the Generate button to
generate the key pair. While the key is being generated, move the mouse
around the blank space to provide key randomness.
- Key Passphrase: enter and confirm a passphrase for the
key. Remember the passphrase - it will be required later.
- Save Public Key: click the "Save public key" button
and store the key in a file called
public1.key .
- Save Private Key: click the "Save private key" button
and store the key in a file called
private1.key , in the
same directory where you saved the public key.
- Copy Key Contents: copy the contents of the public
key field (at the top of the dialog) to a file named
public1-openssh.key . This key will be required later.
- Close puttygen
3. Load and Configure the Putty Authentication Agent
Run the pageant program. This will load 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 .
4. Configure Putty to use Pageant
Run the putty program. Configure as follows:
- Specify the CVS Server: on the Session
page of the Configuration form, enter the host name or IP address of the
CVS server.
- Specify Protocol: on the Session page,
in the Protocol field, select the "SSH" protocol.
- Create Saved Session: in the Saved Sessions
field, enter the host name again. Click the Save button.
- Configure Connection: on the Connection
page of the Configuration form, enter your user name for the CVS server
in the field labeled Auto-login username.
- Configure SSH Protocol: on the SSH
page of the Configuration form, specify "2" for the Preferred
SSH protocol version.
- Enable Agent Forwarding: on the Auth
page of the Configuration form, check Allow agent forwarding.
In the Private key file for authentication field, specify
the path and file name of the private key created above
(
private1.key ).
- Save Session Information: on the Session
page of the Configuration form, click the Save button.
5. Store Public Key on CVS Server
You must store the public key file generated in step 2
(public1-openssh.key ) on the CVS server.
- Open Command Window: open a command prompt window by
typing
cmd in the Windows Run dialog.
- Copy Public Key to Server: at the command prompt, enter:
pscp c:\path\to\public1-openssh.key username@cvs.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@cvs.server.com specifies your user name
on the CVS server and the URL of the CVS server. You will be prompted to confirm
the legitimacy of the host, and you may be prompted to enter your password
for the CVS server.
- Connect using Putty: if necessary, run the
putty program. In the Saved Sessions field,
double-click the configuration created in Step 4. This will establish a
connection to the CVS server.
- Configure the Key on the Server: after logging into the
CVS server, enter the following commands to configure the SSH key:
mkdir ~/.ssh
chmod 700 .ssh
cat ~/public1-openssh.key >> ~/.ssh/authorized_keys
rm ~/public1-openssh.key
chmod 600 ~/.ssh/*
- Log off and Exit Putty: enter
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.
7. Check Out a CVS Module
- Create Local CVS Directory: create a directory on your
system to store a copy of the CVS repository.
- Copy Files to Local Directory: at a command prompt, enter:
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 user name
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 repository that you want to work with.
Login will be handled by SSH. The files will be copied down to your
local system. These environment variables will not interfere with non-SSH
repositories.
These variables should be permanently configured in your system environment
(for example, by adding them to the autoexec.bat
file or configuring them in you system properties. Windows Me and 9x systems
must be rebooted 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, you must permanently configure these
variables in the environment (for example, by adding them to the autoexec.bat
file), and then you must reboot before proceeding.
To configure CVS to use SSH, refer to
http://xml.apache.org/forrest/community/howto/cvs-ssh/howto-cvs-ssh.html.
Be sure to read the NOTES carefully!
On all platforms, create an environment variable as follows:
CVS_RSH=ssh
CVS will be able to determine when to use SSH depending
on how you check out the modules. If you use the 'cvs login' method
with the 'pserver' protocol, CVS will not use SSH even if
CVS_RSH=ssh is set in the environment.
On Windows, you must also configure the cygwin SSH Agent as follows:
- Open a cygwin shell.
- Enter
exec ssh-agent bash .
- Enter
ssh-add .
- To check out a CVS module, enter:
cvs -d :ext:username@cvs.server.com:/repository_name co cvs_module
...where username@cvs.server.com specifies your user name
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 repository that you want to work with.
- Start Komodo within the cygwin shell as follows:
/path/to/komodo-2.0/komodo.exe
After you have completed the above configuration steps, follow these steps
to open Komodo with CVS-SSH enabled:
- Open a cygwin shell.
- Enter
exec ssh-agent bash .
- Start Komodo within the cygwin shell as follows:
/path/to/komodo-2.0/komodo.exe
Ensure that the command-line version of Perforce ("P4") is correctly installed
and functional before working with a Perforce repository within Komodo. The
p4.exe file must be located in a directory that is specified
in your PATH environment variable.
Perforce users who use the P4CONFIG feature of perforce may find that
Komodo's source code control doesn't work except if Komodo is started from
within the client view of the Perforce repository they are working on.
Use the Source Code Control page in Komodo's
Preferences to configure
Source Code Control integration. To open the Komodo Preferences, select
Edit | Preferences.
Top
Source Code Control Toolbar
Common source code control commands can be accessed from the
Toolbar
at the top of the Komodo workspace. Refer to the command descriptions below
for more information. The toolbar commands apply to the file that is currently
displayed in the editor pane.
Source Code Control Menus
Source code control functions can be accessed by selecting the
File | Source Control drop-down menu.
Source code control context menus can be invoked by right-clicking on files
or folders in the following areas:
Source Code Control Output Window and Status Messages
The SCC Output pane is located on a tab at the bottom of
the Komodo workspace. As you execute source code control commands, such as
editing or checking in files, details of the command will be displayed in the
SCC Output pane.
Error messages and warnings are also displayed in the
SCC Output pane. Additionally, error messages and warnings
are displayed on the status bar in the bottom left corner of the Komodo
workspace.
As described above, source code control commands can be invoked from
multiple locations. The following commands will be available, depending on the
context:
- Add: adds a file to the current source code repository.
- Edit: checks out a file from the current source code
repository.
- Revert Changes: checks the file back into the
repository abandoning any changes since is was checked out.
- Remove: deletes the file from both the source code
repository and the local repository mirror.
- Update: updates the local version of the repository
files.
- Diff (Compare Files): compares the version in the editor
pane with the version in the source code repository. Depending on the setting
in the Preferences,
the diff display will either be shown in another Komodo editor tab, or in a
separate window. The style of diff can also be configured in the Preferences.
- Commit Changes: submits the file back to the source
code repository.
Top
|