http://www.debian.org/doc/manuals/reference/ch-vcs.en.html
The following sections teach you how to use different commands in Subversion.
To create a new Subversion archive, type the following:
$ cd ~/your-project # go to your source directory $ svn import http://localhost/repos your-project \ project-name -m "initial project import"
This creates a directory named project-name in your Subversion repository which contains your project files. Look at http://localhost/repos/ to see if it's there.
Working with project-y using Subversion:
$ cd # move to the work area
$ svn co http://localhost/repos/project-y # Check out sources
$ cd project-y
... do some work ...
$ svn diff # similar to diff -u repository/ local/
$ svn revert modified_file # undo changes to a file
$ svn ci -m "Describe changes" # check in your changes to the repository
$ vi newfile_added
$ svn add newfile_added
$ svn add new_dir # recursively add all files in new_dir
$ svn add -N new_dir2 # nonrecursively add the directory
$ svn ci -m "Added newfile_added, new_dir, new_dir2"
$ svn up # merge in latest version from repository
$ svn log # shows all changes committed
$ svn copy http://localhost/repos/project-y \
http://localhost/repos/project-y-branch \
-m "creating my branch of project-y" # branching project-y
$ svn copy http://localhost/repos/project-y \
http://localhost/repos/proj-y_release1.0 \
-m "project-y 1.0 release" # added release tag
... note that branching and tagging are the same. The only difference
... is that branches get committed whereas tags do not.... make changes to branch ...
$ # merge branched copy back to main copy $ svn merge http://localhost/repos/project-y \ http://localhost/repos/project-y-branch $ svn co -r 4 http://localhost/repos/project-y # get revision 4
Debian Reference
CVS, Sun Jan 14 18:30:35 UTC 2007
Osamu Aoki
documented on: 2007-09-21