Archive

Archive for the ‘Subversion’ Category

How to SVN merge directories recursively

September 25th, 2008 Masao No comments

The correct way to recursively merge two branches using Subversion:

svn merge target_dir@revision source_dir@revision working_dir

Notice:

  • working_dir is most likely the target_dir
  • target_dir comes before source_dir
Use this example when you’re in the working directory you’re trying to merge into:

svn merge .@head source_dir@head .

After merging, you’ll want to check that the merge succeeded:

diff -u –recursive source_dir target_dir
Categories: Linux, Subversion Tags:

Change file permissions in Subversion

September 24th, 2008 Masao No comments

svn propset svn:executable “*” myfile.txt

Categories: Linux, Subversion Tags:

How To Use SVN merge

September 10th, 2008 Masao No comments

If you created a branch and want to merge your branch changes into trunk, here’s what to do:

svn merge trunk_path@head branch_path@head .

Categories: Subversion Tags:

How to setup a basic SVN repository and server

June 18th, 2008 Masao No comments

Become root and install subversion via yum

# yum install -y subversion

Create your svnroot directory

# mkdir /home/svnroot

Edit your svnserve.conf

# vim /home/svnroot/conf/svnserve.conf

Your basic svnserve.conf will look like this:

[general]
anon-access = none
password-db = passwd
authz-db = authz
realm = Masao’s First Repository

Edit your authz file

# vim /home/svnroot/conf/authz

to look like this

[/]
masao = rw

Edit your passwd file

# vim /home/svnroot/conf/passwd

to look like this

[users]
masao = mypassword

Start your svn server

/usr/bin/svnserve -d -r /home/svnroot/

Create a directory and some files in it

$ mkdir myproject

$ cd myproject

$ touch myfirstfile mysecondfile

$ svn import . svn://localhost/myproject -m “initial commit”

Adding mysecondfile
Adding myfirstfile
Committed revision 1.

Now checkout your project

$ cd /tmp

$ svn co svn://localhost/myproject
A myproject/mysecondfile
A myproject/myfirstfile
Checked out revision 1.

You’re done!  Thanks Ian!

Categories: Linux, Subversion Tags: