Setting up Subversion Access

From Apache OpenOffice Wiki
Revision as of 12:03, 12 December 2008 by B michaelsen (Talk | contribs)

Jump to: navigation, search

Setting up Subversion Access

Required tools

  • subversion-1.5.4 or later; download...
  • ssh for committers, preferably OpenSSH 2.4 or later

SSH Setup

You need a ssh key for write access. You can skip this step if you only need readonly access.

SSH key generation

On Unix or Windows/cygwin a SSH identity (private/public key pair) is generated with:

ssh-keygen -t dsa

You'll be asked for pass phrase which protects your private key. Per default the public key is named $HOME/.ssh/id_dsa.pub.

Note that SSH keys created between September 2006 and May 2008 on Debian or Debian derived systems like Ubuntu may be insecure. Please use recent SSH tools.

If you want a dedicated identity for just OOo SVN usage, generate a specially named key pair

ssh-keygen -t dsa -f ~/.ssh/id_dsa_ooo_svn 

and instruct Subversion to use this identity (key pair) with the following configuration entry in $HOME/.subversion/config:

[tunnels]
ssh = ssh -i /home/jr93709/.ssh/id_dsa_ooo_svn

Initial Migration of Keys

Please query IssueZilla for your issue with the attachment holding your key and add it as a dependency to issue 94002. If you are a new svn user, create the issue yourself.

We will then install those keys for DomainDevelopers for read/write access to the SVN repository.

Up to now only few code committers made use of the ssh key upload for the OpenOffice.org SVN repository. Please note that your key will not be migrated without your intervention.

Ongoing Maintenance

We will continue to use IssueZilla for managing and tracking key additions and changes. Please see Submitting Your Certificate (Public Key).

Windows ssh setup with putty

To use ssh on Windows putty's ssh can be used. You need plink.exe, puttygen.exe and pageant.exe. All are available from [1]


As putty uses a different ssh key format you have to convert the private key using puttygen.exe.

Save this file for example as:

<system drive>:\Documents and settings\<user name>\Application Data\id_dsa_ooo_svn.ppk


In the [tunnels] section of the file <system drive>:\Documents and settings\<user name>\Application Data\Subversion\Config

You have to add the line:

ssh = plink.exe -i <path to you converted private key file>

Please note that spaces in the path have to be escaped using a backslash.


To be able to call an svn command you need to have the pageant.exe running. Start this and import your private key file.


On the first connection to the server the server's host key has to be added to the registry. This doesn't work within the svn command.

The following command helps to accept this key:

plink.exe -i <path to private pkey> svn.services.openoffice.org svnserve -t

Subversion Setup

Subversion documentation

The excellent Subversion documentation can be found here: http://svnbook.red-bean.com. Please use the nightly build documentation for 1.5 and later, it covers new features like merge tracking.

Please read at least the "fundamental concepts" and "basic usage" part of the documentation!
.
CWS tooling is only a very thin layer around the SVN client hiding the lengthy URLs from sight plus some bookkeeping. Everything else is plain Subversion.

Server access

The OpenOffice.org repository is available at:

svn://svn.services.openoffice.org/ooo Readonly SVN
http://svn.services.openoffice.org/ooo Readonly Http/WebDav (also usable for Browsers)
svn+ssh://svn@svn.services.openoffice.org/ooo Read/Write Access for Developers (requires ssh setup, see above)
http://svn.services.openoffice.org/opengrok/ Interactive indexing Sourcebrowser (not covering cws)

Repository structure

The OOo SVN repository is structured like this:

../trunk                     <= the main development line, currently master workspace DEV300 is on trunk
../cws                       <= child workspaces live here, names need to be unique
../cws/foo                   <= for example CWS foo
../cws/...
../branches                  <= future master workspaces which are not on trunk
../branches/OOO310           <= for example MWS OOO310
../branches/...
../tags                      <= milestone tags, release tags
../tags/DEV300_m32           <= for example milestone DEV300 m32
../tags/..
../dist                      <= space for distribution specific stuff
../patches                   <= space for globally useful patches
../contrib                   <= do we need this?

Subversion Usage Examples

Checking out a milestone

Check out a milestone DEV300 m32 with:

svn checkout svn://svn.services.openoffice.org/ooo/tags/DEV300_m32

Switching between milestones

Switch from milestone DEV300_m32 to DEV300_m35 (safes potentially a lot of checkout time):

cd DEV300_m32
svn switch svn://svn.services.openoffice.org/ooo/tags/DEV300_m35
cd ..
mv DEV300_m32 DEV300_m35

Checking out a cws

Check out a child workspace foo:

svn checkout svn://svn.services.openoffice.org/ooo/cws/foo

Updating a working copy

Update working copy of foo:

cd foo
svn update

Finding out where a working copy originated

Find out the base (milestone or cws) of working copy wc:

cd wc
svn info

List milestones/cws

List all available milestone and release tags:

svn list svn://svn.services.openoffice.org/ooo/tags

List all available child workspaces:

svn list svn://svn.services.openoffice.org/ooo/cws

(Probably EIS is better suited for these tasks.)

Logs

View commit log on a single file:

svn log file.cxx

View only changes on a branch (for example a cws)

svn log --stop-on-copy file.cxx

Include all paths affected by change sets in log command:

svn log --verbose file.cxx

Attribute blame:

svn annotate file.cxx
Personal tools