SVN (Subversion) is a tool used by many software developers to manage changes within their source code tree. SVN provides the means to store not only the current version of a piece of source code, but a record of all changes (and who made those changes) that have occurred to that source code. Use of SVN is particularly common on projects with multiple developers, since SVN ensures changes made by one developer are not accidentally removed when another developer posts their changes to the source tree. The Bochs source code and documentation are available using SVN.
When you have SVN installed, the first step is to do a checkout. The initial checkout command is long and ugly, but usually you only have to do it once. The example below shows the SVN checkout process of the Bochs trunk in Unix. On the Windows platform, you can download a SVN client from subversion.apache.org, or use SVN within Cygwin.
Figure 3-1. Checking out Bochs in SVN
user$ svn co http://svn.code.sf.net/p/bochs/code/trunk/bochs bochs A bochs/ltdl.c A bochs/Makefile.in A bochs/bochs.h . . (This might take a few minutes, depending on your network connection.) . A bochs/install.sh U bochs Checkout, Revision 10754. user$ cd bochs user$ ls aclocal.m4 cpu logio.cc pc_system.cc bios cpudb.h ltdl.c pc_system.h bochs.h crc.cc ltdlconf.h.in plugin.cc build disasm ltdl.h plugin.h bx_debug doc ltmain.sh README bxversion.h.in docs-html main.cc README-plugins bxversion.rc.in extplugin.h Makefile.in README.rfb CHANGES fpu memory README-wxWindows config.cc gdbstub.cc misc TESTFORM.txt config.guess gui msrs.def TODO config.h.in host osdep.cc win32_enh_dbg.rc config.sub install-sh osdep.h win32res.rc configure instrument param_names.h wxbochs.rc configure.in iodev PARAM_TREE.txt COPYING load32bitOShack.cc patches user$ _
Note: This is just an example output of a checkout of specific version of the Bochs trunk and folder. Depending on the checkout command and revision, you most likely will see more/other files.
Tip: If you have write access to the Bochs SVN tree, see the Developers Guide  for details.
The SVN checkout process (above) gives you a directory called bochs
that contains the very latest source code. I will refer to this directory
$BOCHS. In each subdirectory directory there's also a
directory called ".svn" which tells the SVN software where the code was checked
out, what version you have, and where to go for future updates.
Most developers use SVN to always give them the latest source code. The minute
that any developer checks in a change, they are available to everyone else
through SVN. You just have to type svn update in the
$BOCHS directory, and SVN will retrieve any files and directories that have
been changed since you did a checkout. If you update regularly, each update
takes a short time because it downloads only the files that changed.
See also Getting a release version.
The svn update command tells you if any new files have been downloaded from the server, and it also tells you if you have modified any of the SVN-controlled files. As it checks through the source directories, it will list files that have changed, with a single letter before the name that tells the status of that file. The most common status letters are listed below.
Table 3-1. Status letters in a SVN update
|?||unknown||This file is in your bochs directory, but SVN does not know anything about it. For example, when you compile Bochs, any files created during the build process appear as ?.|
|U||update||SVN downloaded a new version of this file because it changed on the server, usually because someone else did a checkin.|
|A||added||SVN downloaded a newly added file from the server.|
|D||deleted||This file has been deleted on the server and SVN removed it from your local copy.|
|C||conflict||You have changed this file on your disk, but this change conflicts with a change that was checked in. Conflicts occur when two people change the same line of code in different ways. You need to edit the conflicting file(s) and clean it up by hand. Or, sometimes it's easiest to discard your own edits and download a fresh copy, by deleting the conflicting file and running svn update again.|
You can also use the SVN checkout command to get the Bochs source code for any release since March 2000. The command is
user$ svn co http://svn.code.sf.net/p/bochs/code/tags/tagname/bochs bochsThe tagname tells which release you want, and it can be one of the following:
Table 3-2. Bochs Release Tags
|Bochs version||Release tag for SVN|
Entire books have been written on SVN, so there's no sense in duplicating it all here in the Bochs documentation. Some sources of additional information are listed below.
You can download SVN software and documentation from subversion.apache.org.
Cygwin is an open source Unix-like environment for Windows platforms, available at www.cygwin.com.