Difference between revisions of "Using Subversion"

From GNUstepWiki
Jump to navigation Jump to search
Line 43: Line 43:
 
and follow the prompts, and when it prompts for a new passphrase, simply hit enter.
 
and follow the prompts, and when it prompts for a new passphrase, simply hit enter.
  
=== Windows notes ===
+
=== Subversion on Windows ===
  
In theory you should be able to check out a developer copy of GNUstep using TortiseSVN along with pagent (part of PuTTY) - however, no matter what I tried, TortiseSVN won't stop asking for my private key password.
+
[http://tortoisesvn.tigris.org/ TortiseSVN] is the preferred Subversion client on Windows.
  
Instead I installed openssh using cygwin, and set it us as described above. This works well, the only annoyance is you have to keep a cygwin shell open for doing svn operations.
+
For developers checking out devmodules, follow these instructions to get your system to remember your private key password (see the sections "PuTTY Configuration" and Pageant and "TortoiseSVN Usage").
 +
 
 +
http://matttrent.com/blog/2005/aug/21/how-use-ssh-agent-windows-tortoisesvn/
 +
 
 +
You will need the tools Putty, Puttygen, and Pageant from [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html].
 +
 
 +
Subversion could also be obtained from Cygwin, however the Cygwin subversion client is currently broken for me (and less convenient than TortiseSVN.)
  
 
== Some background on repository layout ==
 
== Some background on repository layout ==

Revision as of 18:26, 8 June 2010

Anonymous GNUstep SVN Checkout

Simply run:

svn co http://svn.gna.org/svn/gnustep/modules

You cannot use SVN+SSH unless you are a developer, and have a username and SSH public key registered at gna.org. See below for more details. You cannot check out /devmodules unless you are a developer. /modules is the same as /devmodules, except the SVN external references work for anonymous SVN checkouts.

Developer GNUstep SVN Checkout

Simply run:

svn co svn+ssh://svn.gna.org/svn/gnustep/devmodules

Setting up Subversion for Developer Use

The first thing you will want to do is setup the ssh access to svn.gna.org. If you cannot type

svn list svn+ssh://svn.gna.org/svn/gnustep/devmodules

without having to type a password or in some way change the above command, read below.

If you have a different username on your system than on svn.gna.org

To get around this problem, you can setup per host SSH settings. To do this, open ~/.ssh/config and at the end add the lines

Host svn.gna.org
      User aeruder

This makes it so that everytime I connect to svn.gna.org with SSH, it will automatically use the username aeruder instead of my unix username.

If you are prompted for a private key password

This will look something like:

Enter passphrase for key '/home/andy/.ssh/id_dsa': 

To get around this you can either setup ssh-agent to cache this password or you can simply turn off the password on your private key. To do the latter, simply type:

ssh-keygen -t dsa -p

and follow the prompts, and when it prompts for a new passphrase, simply hit enter.

Subversion on Windows

TortiseSVN is the preferred Subversion client on Windows.

For developers checking out devmodules, follow these instructions to get your system to remember your private key password (see the sections "PuTTY Configuration" and Pageant and "TortoiseSVN Usage").

http://matttrent.com/blog/2005/aug/21/how-use-ssh-agent-windows-tortoisesvn/

You will need the tools Putty, Puttygen, and Pageant from [1].

Subversion could also be obtained from Cygwin, however the Cygwin subversion client is currently broken for me (and less convenient than TortiseSVN.)

Some background on repository layout

To familiarize yourself with the layout, I would recommend looking at the web-access to svn for GNUstep. You will notice that every project is in its own portion of the repository. For example:

/libs
/libs/gui
/libs/gui/trunk

/libs/gui/branches
/libs/gui/branches/dawn
/libs/gui/branches/...

/libs/gui/tags
/libs/gui/tags/alex_last_semistable
/libs/gui/tags/...

This layout is very handy for having a per-project repository. I can easily branch or tag just /libs/gui and it all stays in its own namespace. However, what this DOES mean is that you cannot simply checkout /libs/gui or you will end up with several copies of the source. To get around this, we are using a nifty feature of Subversion called externals. Externals are metadata on a directory that basically tell the svn client to checkout some other url into a subdirectory when it is checked out. So if I type:

svn proplist -v svn+ssh://svn.gna.org/svn/gnustep/devmodules/core

It will tell me that the svn:externals property contains:

gui     svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk
back    svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk
base    svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk
make    svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk

So everytime I checkout /devmodules/core the svn client will automatically go to these URLs and check them out into subdirectories. When I make changes in gui/ and commit them, it will really commit to /libs/gui/trunk. For the most part if you checkout /devmodules, the externals have already been setup such that it will checkout something similar to checking out the whole repository before.

Tips, Tricks, and Resources