Product SiteDocumentation Site

4.13. Supplemental Exercises

Freeciv is a popular FOSS game whose repository can be retrieved using Subversion. Originally hosted on a Subversion server (at sourceforge.com), the project has been moved to a Git server, but the subversion commands still work.) You could check out the project repository much as you normally would, using svn checkout https://github.com/freeciv/freeciv However, the repository is large and includes multiple branches. Instead of checking out the entire repository, you may wish to retrieve only the trunk or a specific branch.

The following transcript shows how you can checkout the repository without retrieving any files using --depth empty, then update (retrieve files) for only the trunk and a single branch.

$ svn checkout --depth empty https://github.com/freeciv/freeciv
Checked out revision 39733.
$ cd freeciv
$ ls
$ ls -a
./    ../   .svn/
$ svn up trunk
Updating 'trunk':
A    trunk
A    trunk/ABOUT-NLS
A    trunk/AUTHORS
A    trunk/COPYING
A    trunk/ChangeLog
A    trunk/INSTALL
A    trunk/Makefile.am
...
Updated to revision 39733.
$ ls
trunk/
$ du -d 0 -h trunk
344M	trunk
$ svn up --depth empty branches
Updating 'branches':
A    branches
Updated to revision 39733.
$ cd branches
$ ls
$ svn up S3_0
Updating 'S3_0':
A    S3_0
A    S3_0/ABOUT-NLS
A    S3_0/AUTHORS
A    S3_0/COPYING
A    S3_0/ChangeLog
A    S3_0/INSTALL
...
Updated to revision 39733.
$ ls
S3_0/
$ du -d 0 -h .
344M	.
$ cd ..
$ ls
branches/ trunk/
$ 
Download the code from both trunk and a recent branch. Do your best to figure out what the differences are. (Note: This might take a while.) How would you summarize your experience?