Committer access (Buckminster)

From Eclipsepedia

Jump to: navigation, search

Contents

Setting up Subclipse for committer access to the Buckminster repo

In order to commit to our SVN repository at Eclipse.org, you need to setup the svn+ssh protocol. After some trial and horror, these are the steps I made to make everything work smoothly.

Prerequisites

  1. Install Subclipse into your Eclipse IDE using the Eclipse update manager. Point your update manager to http://subclipse.tigris.org/update_1.0.x
  2. Download and install a ssh client that will allow you to login to the server. I use Putty from: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Server configuration

  1. Using your ssh client and your committer login/password, login to "dev.eclipse.org".
  2. Make sure you are in your home directory and create a public/private key pair with ssh-keygen. Do not use a passphrase. If you do, you'll be asked for it over and over again by the svn client:
    ssh-keygen -b 1024 -t dsa -f mykey
  3. Create the .ssh folder and copy your public key to the authorized_keys file in that folder.
    mkdir .ssh
    cp mykey.pub .ssh/authorized_keys
  4. Set the correct permissions
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/authorized_keys
  5. Copy the contents of the private key (the file named mykey with no extension) to your clipboard and paste it into temporary file on your local computer.

Client configuration

  1. Convert the key into a format that is usable by PuTTY and plink.
    1. Download http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe (if this is not already included in your Putty installation)
    2. Import the temporary file you just stored. Use Conversions -> Import key.
    3. Save the converted private key to a file of choice. I use "c:\Documents and Settings\Thomas Hallgren\SSHKeys\eclipse_key.ppk". Save that file.
  2. Download and install Tortoise for SVN from: http://tortoisesvn.net/downloads. The plink.exe supplied with Tortoise is a command line client that is silent (i.e. doesn't pop up an annoying cmd window each time it's called).
  3. Find your subversion configuration file and the section called [tunnels]. Make sure this section is not commented out. The file is found at %APPDATA%\Subversion\config on a typical windows installation.
  4. Add the following line, substituting your home folder, login name, and the path to the private key file that you saved in step #1. Be sure to use double backslashes.
    ssh = "C:\\Program Files\\TortoiseSVN\\bin\\TortoisePlink.exe" -ssh -l <your login> -i "c:\\Documents and Settings\\<your home>\\SSHKeys\\eclipse_key.ppk"

You should be able to use subclipse from now on. Our SVN repo is at:

svn+ssh://dev.eclipse.org/svnroot/technology/org.eclipse.buckminster

Optional

In order to use the TortoiseSVN GUI you also need to tell that client what SSH it should use (for some reason look at the SVN config file).

  1. Right click on any folder in your normal Windows file explorer. Select TortoiseSVN -> Settings -> Network.
  2. Copy the ssh = ... line from the config file. Leave out the leading "ssh =" and substitute all double \\ for single \. (keep the " characters).

Now TortoiseSVN should work fine as well.

Observations and hints

If you have PuTTY installed, be sure you have the "Default settings" configured to use SSH version "2" or "2 only", otherwise the SSH key doesn't work.

If you happen to set up the PuTTY Default Settings for SSH version "1" and you are not able to change this setting using PuTTY gui (this can happen e.g. if you import registry settings), you can edit the windows registry (HKEY_CURRENT_USER/Software/Simon Tatham/PuTTY/Sessions/Default%20Settings/SshProt, set to value "2").

Working and merging.

All Buckminster development work should be done on the trunk. The CQUERY to set things up is http://www.eclipse.org/buckminster/samples/queries/buckminster-dev.cquery. Once you've materialized your workspace, it's likely that you want to "Relocate" from the "svn" protocol" to "svn+ssh". Unlike CVS, this is not done automatically using our svn client (we need to address that as a bugzilla).

NOTE: The "normal" buckminster.cquery will give you the 3.2.x branch. You have to use buckminster-dev.cquery to get the trunk!

We do Buckminster work on the trunk and merge relevant things to the 3.2.x branch. This does *not* apply to Cloudsmith work. Cloudsmith work uses Eclipse 3.2.x everywhere. We don't want to be sensitive to changes in Eclipse 3.3 when developing the Cloudsmith server or website. So it's OK to add patches driven by Cloudsmith work to the 3.2.x branch and later merge them to the trunk.

Before you do anything, I recommend reading the "Subclipse - Subversion Eclipse Plugin" -> "Tasks" -> "Maintaining branches" chapter in the Eclipse Help.

  1. Set up two workspaces. One for the trunk (using buckminster-dev.cquery) and one for branches/3.2.x (using buckminster.cquery).
  2. Use Eclipse 3.3M5eh (or what's latest) on the trunk and Eclipse 3.2.2 on the 3.2.x branch.
  3. Perform relevant changes on the trunk. Commit these changes.
  4. Switch Eclipse (and workspace) to the 3.2.x.
  5. Use Team -> Merge. Change the URL so that the "/branches/3.2.x/" part reads "/trunk/"
  6. Click "Show Log" and select the relevant version (i.e. the last one).
  7. Click Merge.
  8. Verify that everything looks OK, change things if necessary.
  9. Commit the 3.2.x branch.