From Dyna
Revision as of 04:59, 29 February 2008 by (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

novarmon domreldardar codomcro

How to switch to Subversion without going insane


If your personal machine doesn't have the svn command yet, here's how to install it: [1]

Or maybe just type (worked for me!)

sudo apt-get install subversion


A parallel text...

CVS Subversion Explanation
cvs --help checkout svn help checkout Displays help for the checkout command
cvs -d /export/cvs/dyna co dyna svn co file:///export/svn/dyna/trunk dyna Checks out the dyna project from local directory
cvs -d co dyna svn co svn ssh:// dyna How often did you have to look up that CVS syntax? Well, okay, the svn syntax is not much better...
cvs -d /export/cvs/dyna co -r my_branch dyna svn co file:///export/svn/dyna/branches/my_branch dyna Checks out the dyna branch my_branch
ls /export/cvs/dyna svn list file:///export/svn/dyna/

svn list file:///export/svn/dyna/trunk

Subversion does not store files and directories in the file system, but in a database. So, a direct ls is not possible. You can use the alias svn ls instead of svn list, though.
cvs ci -m "some changes" svn ci -m "some changes" Easy, but how often will you forget to actually type svn instead of cvs? ;-)
cvs -nq up svn status -u Find out what's changed without modifying your copy
cvs up svn up Get latest version from repository and, if necessary, merge it with your copy
cvs up -p -r <revision> file.cpp svn cat -r <revision> file.cpp Shows the content of file.cpp as of revision <revision>, without changing your local version
cvs up -C file.cpp svn revert file.cpp

svn up

Overwrites your local changes, reverting them and updating to the version in the trunk
cvs stat -v foo.txt svn info foo.txt Shows versioning information on foo.txt
cvs update -j 1.2 -j 1.1 foo.txt svn merge -r 1942:1941 foo.txt Rolls back from the 1.2 version to the 1.1 version of a file (resp. rev 1942 back to 1941 in svn, which counts differently). See undo changes
Personal tools