Revert files to older svn version

A lot of times developers do one or other mistakes and you need to revert the files to older version. Which basically mean that you need to merge backwards with a older version of files. So let’s say if you want to go back from version 100 to 99, you’ve to


svn update
svn merge -r 100:99 .
svn commit -m "Rolling back to version 99"

Notice the . at end of svn merge command, this tells that current directory needs to be merged if you need a particular file to be merged you need to issue


svn merge -r 100:99 conf.php
svn commit -m "Rolling back conf.php to version 99"

Hope this helps someone.

Restricting folders for svn access

While working with several developers at the same time, you really need a method to make sure that each team doesn’t mess up with someone else module. Splitting directories of each user is a nice idea when your developers are not that diciplined or when you are running multiple sites of same repository.

I faced a similar problem when i wanted to restrict access to 2 of my developers from editing anything above directories i allocated. For this

Go to your conf directory this would be located inside your main configuration directory.

#cd conf

Fire up your favorite editor, mine is nano

#nano authz

And put a access control to directory

[/repo/project/folder]
usera = rw
userb = r

Say if you have multiple repositry in svn server, restrict access to a particular repositry by

[repo1:/repo/project/folder]
usera = rw
userb = r

I think this should help.