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 is available using SVN[1].
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[2].
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 [3] 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
as $BOCHS
. In this directory there's also a subdirectory 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
Letter | Meaning | Description |
---|---|---|
? | 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 | SVN revision |
---|---|---|
2.7 | REL_2_7_FINAL | 14332 |
2.6.11 (bugfix) | REL_2_6_11_FINAL | 13774 |
2.6.10 (intermediate) | REL_2_6_10_FINAL | 13629 |
2.6.9 (intermediate) | REL_2_6_9_FINAL | 13181 |
2.6.8 (intermediate) | REL_2_6_8_FINAL | 12740 |
2.6.7 (intermediate) | REL_2_6_7_FINAL | 12531 |
2.6.6 (bugfix) | REL_2_6_6_FINAL | 12375 |
2.6.5 (intermediate) | REL_2_6_5_FINAL | 12349 |
2.6.2 (bugfix) | REL_2_6_2_FINAL | 11694 |
2.6.1 (intermediate) | REL_2_6_1_FINAL | 11667 |
2.6 | REL_2_6_FINAL | 11395 |
2.5.1 (bugfix) | REL_2_5_1_FINAL | 10946 |
2.5 | REL_2_5_FINAL | 10801 |
2.4.6 | REL_2_4_6_FINAL | 10202 |
2.4.5 | REL_2_4_5_FINAL | 9914 |
2.4.2 | REL_2_4_2_FINAL | 9568 |
2.4.1 | REL_2_4_1_FINAL | 9368 |
2.4 | REL_2_4_FINAL | 9289 |
2.3.7 | REL_2_3_7_FINAL | 8537 |
2.3.6 | REL_2_3_6_FINAL | 8111 |
2.3.5 | REL_2_3_5_FINAL | 7840 |
2.3 | REL_2_3_FINAL | 7538 |
2.2.6 (intermediate2) | REL_2_2_6_FINAL | 7060 |
2.2.5 (intermediate1) | REL_2_2_5_FINAL | 6942 |
2.2.1 (bugfix1) | REL_2_2_1_FINAL | 6624 |
2.2 | REL_2_2_FINAL | 6476 |
2.1.1 (bugfix1) | REL_2_1_1_FINAL | 5560 |
2.1 | REL_2_1_FINAL | 5441 |
2.0.2 (bugfix2) | REL_2_0_2_FINAL | 4592 |
2.0.1 (bugfix1) | REL_2_0_1_FINAL | 4491 |
2.0 | REL_2_0_FINAL | 4409 |
1.4.1 (bugfix1) | REL_1_4_1_FINAL | 2513 |
1.4 | REL_1_4_FINAL | 2235 |
1.3 | REL_1_3_FINAL | 1705 |
1.2.1 (bugfix1) | REL_1_2_1_FINAL | 912 |
1.2 | REL_1_2_FINAL | 797 |
1.1.2 (bugfix3) | REL_1_1_2_BASE | 510 |
1.1.1 (bugfix2) | REL_1_1_1_BASE | 57 |
1.1 (bugfix1) | REL_1_1_BASE | 51 |
1.0 (bochs-2000_0325a) | REL-bochs-2000-03-25 | 7 |
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 is listed below.
The subversion.apache.org site has tons of SVN FAQs and documentation.
A German SVN FAQ is available at University of Muenster.
[1] | You can download SVN software and documentation from subversion.apache.org. |
[2] | Cygwin is an open source Unix-like environment for Windows platforms, available at www.cygwin.com. |
[3] | See the Developers Guide and/or look at SourceForge's Subversion documentation, for instructions. |