Skip to Content
Linux in a Nutshell, 6th Edition
book

Linux in a Nutshell, 6th Edition

by Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
September 2009
Beginner
942 pages
85h 34m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, 6th Edition

Using Subversion: A Quick Tour

This section provides a very quick tour of using Subversion for version control. We start with the initial version of a project for importing into Subversion:

$ find /tmp/hello -print    Show directory layout
/tmp/hello
/tmp/hello/branches         Directory for branch development
/tmp/hello/tags             Directory for tagged releases
/tmp/hello/trunk
/tmp/hello/trunk/hello.c    Mainline development is done on the trunk
/tmp/hello/trunk/Makefile
/tmp/hello/trunk/README

The next steps are to create the repository and then to import the project into it:

$ svnadmin create /path/to/svnrepos
$ svn import /tmp/hello file:///path/to/svnrepos -m "initial import"
Adding         /tmp/hello/trunk
Adding         /tmp/hello/trunk/hello.c
Adding         /tmp/hello/trunk/Makefile
Adding         /tmp/hello/trunk/README
Adding         /tmp/hello/branches
Adding         /tmp/hello/tags

Committed revision 1.

Now that the project exists in Subversion, we check out a working copy into a sandbox underneath our home directory and start making changes:

$ cd                                           Move to home directory
$ svn checkout file:///path/to/svnrepos hello  Check out working copy
A  hello/trunk
A  hello/trunk/hello.c
A  hello/trunk/README
A  hello/trunk/Makefile
A  hello/branches
A  hello/tags
Checked out revision 1.

$ cd hello/trunk                               Change to sandbox
$ vi message.c hello.c Makefile                Make changes
3 files to edit

$ cat message.c                                Show newly created file
const char message[  ] = "hello, world!";
$ make                                         Compile program and test it cc -c -o hello.o hello.c cc -c -o message.o message.c cc -O hello.o ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Unix in a Nutshell, 4th Edition

Unix in a Nutshell, 4th Edition

Arnold Robbins
Linux Under the Hood

Linux Under the Hood

Sander van Vugt
Linux Kernel in a Nutshell

Linux Kernel in a Nutshell

Greg Kroah-Hartman

Publisher Resources

ISBN: 9780596806088Errata Page