My Subversion Reference


Picture:Clock Published on October 14th, 2007 in Other

I always wanted to dig into Subversion and start using it productively. So I bought myself a book from German publisher Galileo Computing. After reading it, I was still confused and missed a few important basics (thanks to the book, it totally sucked!). So after half a year or so, I decided to give Subversion another try. I decided to follow some tutorials and guides on the internet and voila, I have compiled myself a handy reference that I’m now using on a daily basis. Thanks to it, I have become a happy Subversion user. As you can see, it’s not always a good idea to shell out money for a book if you can get better help for free on the internet. So here’s my reference (I hope you’ll find it useful):

1 Important
• svnadmin is a server tool. As with all subversion server tools,
you can not specify a repository using a URL (file:///), only
standard unix paths are allowed.

• It is recommended to create a repository for every project you
want to use version control for

2 Setup
2.1 Creating a Repository
The following command creates a repository with the standard
filesystem (as of Subversion 1.2 this is FSFS):

svnadmin create /path/to/repos

3 Using an existing Repository
3.1 Getting started
• To import unversioned files to a repository:
svn import [directory] http://www.mydomain.tld/svn/project -m “Initial import”

• When using a different subversion user:
svn import [directory] http://www.mydomain.tld/svn/project -m “Initial import” –username [username]

• This does not create a local working directory though, you will
still have to checkout a working copy by executing:
svn checkout http://www.mydomain.tld/svn/project –username [username]

• Before commiting your changes, you can take a look, at what you
have changed:

– list files that have been affected
svn status

– show differences within the file between the old version and
the new one
svn diff

3.2 Important Commands
• Check out a specific revision of a repository
svn checkout -r 1729

• Check out a clean directory tree (without Subversion
information)
svn export http://www.mydomain.tld/svn/project

• Update your working copy to the current repository state
svn update

• Make changes
svn add
svn delete
svn copy
svn move

• Examine your changes
svn status
svn diff

• Possibly undo some changes
svn revert

• Resolve Conflicts (Merge Others’ Changes)
svn update
svn resolved

• Commit your changes
svn commit

• See an overview of all revisions (commited changes)
svn log

4 Troubleshooting
• When having problems logging in via svn+ssh, try to change “
PasswordAuthentication” to “yes” within the server’s “
sshd_config” file.

• Delete all “svn” & “.svn” directories if you’re permanently
getting 403 errors when using Apache.

Share This

Trackback URL for this post:
http://www.yatblog.com/2007/10/14/my-subversion-reference/trackback/


5 comments

    [...] My Subversion Reference | Yet another Tech Blog (tags: subversion svn reference tips tutorial development version control) [...]

    [...] Référence Subversion [...]

    House of Code March 1st, 2008

    Subversion Obliterate, the forgotten feature…

    Subversion Obliterate has been a much wanted feature for many years now, yet it is not even planned or mentioned on the Subversion roadmap. Discussions have been going on and money has been waving, yet still no movement towards a concrete implementatio…

    Subversified September 26th, 2008

    [...] If you happen to want to learn more about SVN and getting started, take a look here: My Subversion Reference [...]

    Subversified | Zyaga May 15th, 2009

    [...] If you happen to want to learn more about SVN and getting started, take a look here: My Subversion Reference [...]

Shout it out!