PyPy
PyPy[svn-help]

Installing subversion for PyPy

Jens-Uwe Mager has prepared some installation files which should help you to install subversion on your computer.

Getting started

If you're just getting started with subversion, here's a simple how-to. For complete information, you can go read the subversion guide.

Download and install the appropriate installation file of subversion above.

For linux:

download the tarball. unzip and untar it. Then type ./configure. Then, as root, make followed by make install. Voila ... a subversion client.

For Debian users:

$ apt-get install subversion-tools

People using Debian stable first need to add the following line to /etc/apt/sources.list (thanks backports!):

deb http://fs.cs.fhm.edu/mirror/backports.org/debian stable subversion

Note that you can always go look at the files online with your browser, located at: http://codespeak.net/svn/pypy/dist But, you'll want to check out your own local copies to work on.

Check out and Check in

There are currently two directories you'll want to check out: /src and /doc In order to get the sourcecode and docs downloaded onto your drive, open a shell or commandline and type:

$ svn co http://codespeak.net/svn/pypy/dist
$ svn co http://codespeak.net/svn/pypy/extradoc

If you are behind a dump proxy this may or may not work; see below.

Once you've got the files checked out to your own system, you can use your favorite text editor to change to files. Be sure to read the coding-guide and other documentation files before doing a lot of work on the source code. Before doing any work, make sure you're using the most recent update with:

$ svn up

this will update whichever subdirectory you're in (doc or src).

When you're ready to check in a file,

cd to your local checked out sourcecode directory, and if necessary, copy the file over from wherever you worked on it:

$ cp ~/mydir/filename.ext filename.ext

If you're adding a brand-new file:

$ svn add filename.ext

Then, to commit it:

$ svn ci -m "your comments about what changes your committing"
$ your password: (this may not be necessary)

You'll see something like the following:

Adding         goals/stringcomp.py
Transmitting file data .
Committed revision 578.

or:

Sending        coding-guide.txt
Transmitting file data .
Committed revision 631.

Check online on the svn-commit archives and you'll see your revision. Feel free to add a documentation file on any major changes you've made!

Some other useful subversion tricks:

Be sure to remember ``svn`` in the commandline in the following commands.

$ svn mv filename.ext
to move or rename a file
$ svn rm filename.ext
to remove (delete) a file
$ svn status
will let you know what changes you've made compared to the current repository version
$ svn revert filename.ext
will fix problems if you deleted or moved a file without telling svn.
$ svn cleanup
last resort to fix it if you've got a totally messed up local copy. Use this if you see error messages about locked files that you can't fix otherwise.

Circumventing proxies

Some proxies don't let extended HTTP commands through. If you have an error complaining about a bad request, you should use https: instead of http: in the subversion URL. This will make use of SSL encryption, which cannot be intercepted by proxies.

Alternatively, if you want to change your proxy configuration, see the subversion FAQ: http://subversion.tigris.org/faq.html#proxy

How to Avoid Line-ending Hell

We will assume that whenever you create a .txt or a .py file, you would like other people to be able to read it with the line endings their OS prefers, even if that is different from the one your OS likes. This could occasionally be wrong -- say when you are specifically testing that code you are writing handles line endings properly -- but this is what you want by default. Binary files, on the other hand, should be stored exactly as is. This has to be set on every client. Here is how:

In your home directory edit .subversion/config and comment in

[miscellany]
enable-auto-props = yes

[auto-props]
*.txt = svn:eol-style=native
*.py  = svn:eol-style=native