воскресенье, 17 октября 2010 г.

HOWTO: Simple use of SVN and creation/serving of repository

Well for me SVN was hard thing to do.I will say some tips.
(of course install svn first # sudo apt-get install subversion subversion-tools )

Choose your directory for svn repository (for me its anywhere :D.../home/... )
# svnadmin create myrepo
you have created directory myrepo which contains configs and svn db

Go to myrepo/conf and edit svnserve.conf,passwd,authz
# cd myrepo
# gedit passwd
# gedit authz

In authz you can just write (for ex.):

[/]
ilja = rw


So that user ilja will be able to read-write to root..svn...repo...whatever :P

Now i think you want to import your files/projects in repo.
# svn import .  /home/ija/proj/ -m "Initial import"
That must import your files in repo :P


When you have made all,you can start svnserver
# svnserve -d .
-d arg will run it as daemon (i hope you know what is this)
dot means repo in current dir

Now you can test it and download latest version of??? somewhat :D
Goto some else dir

# svn checkout svn://localhost/mydir


Maybe with users you must use svn://ilja@localhost/mydir
Thats all now...

I prefer using some GUI apps.Like rapidsvn or kdesvn.

To update from repo
# svn update
To commit changes
# svn commit

To add file
# svn add file


Etc for delete,mkdir ...and else
Watch in:
# svn help


P.S. you can watch my post how to make svnserve self bootable (daemon)

Комментариев нет:

Отправить комментарий