Youry's Blog

Youry's Blog

SVN setup and SVN tricks

leave a comment »

Now I need to work with several partners and need to install a new repository into a Linux account.

very good paper how to work with versions:

1. First of all I create a new repository it described below.

mkdir -p ~/Documents/REPOS
cd ~/Documents/REPOS/
svnadmin create –fs-type=fsfs ./<repos>
ls -la test_repo/

2. to get access by other user you should read this paper

3. add new users to the owner user group:

Add existing user tony to ftp supplementary/secondary group with usermod command using -a option ~ i.e. add the user to the supplemental group(s). Use only with -G option :
# usermod -a -G ftp tony

see more here:

+++  Old one +++

I write nothing new in this post, simply a reminder for myself how to setup and work with svn on linux (fedora and mac hosts). I like version control for my source code and documents and already started to use this for my work documents (on my work’s servers) and on my the customer’s and home’s servers. I used this site as a guideline:

Create the empty repository structure.
mkdir -p ~/Documents/REPOS
svnadmin create —fs-type=fsfs ./test_repo
ls -la test_repo/

Import stuff into the repository:
cd ~/Documents
mkdir test_project
touch test_project/test_file.c
ls test_project/test_file.c
ln -s ./REPOS /REPOS
svn import ./test_project/ svn+ssh://macmini/REPOS/test_repo/ –message “initial import of test_project”

Make sure you can checkout a copy of the repository.
mkdir checkouts
cd checkouts
svn checkout svn+ssh://macmini/REPOS/test_repo

change a working copy and update the repository
svn commit -m “your comments”

I have the latest version of files in my working copy
svn update

see more in SVN Book

Other issues:
correct any errors in place:
svnadmin recover

dump all svn actions to a log:
svnadmin dump > svn.dump

move existing repos out of the way:
mv papers papers.bdb

recreate repos; default type is FSFS:
svnadmin create papers

replay the log:
svnadmin load < svn.dump

group access setup:

+++ Some tricks, what I need in everyday life from  very good paper how to work with versions:

1. Perform an SVN copy:

svn copy svn+ssh://server/path/to/trunk svn+ssh://server/path/to/branch/newBranch -m "Cut branch: newBranch"

2. Some useful commands:
  • conflict resolution: svn resolve –accept=working  workingFile  (for working file update)
    or =base Choose the file that was the BASE revision before you updated your working copy. That is, the file that you checked out before you made your latest edits.

    mine-full Resolve all conflicted files with copies of the files as they stood immediately before you ran svn update.
    theirs-full Resolve all conflicted files with copies of the files that were fetched from the server when you ran svn update.

    see more

3. very good site

useful paper:

Written by youryblog

November 22, 2010 at 9:16 AM

Posted in IT, UNIX/Linux tricks

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: