Monday, September 29, 2008

Setting up your first SVN Repository



This article is based on windows platform, but you can use the same commands on linux also. The only difference will be in the choice of text editor for modifying configuration files- which will be VIM for linux. In windows before setting up an svn repository for your project, make sure that all the svn binaries are available in the system path. For details on installation and configuration of Subversion server, see the related articles in this website.

Find out the SVN root for the projects, let us say C:\svnroot\
Now we can create a test project under svn root.
C:\Temp>svnadmin create C:\svnroot\samplepro
Now setup authentication for this project
Open C:\svnroot\samplepro\conf\svnserve.conf in notepad
Under the section marked [general] find the commented lines:
#anon-access = read
#auth-access = write

This allows anonymous users read access and authenticated users write access to the project source code. This is not desirable in a corporate environment -unless you are working on a project under GPL. So let us deny anonymous users any kind of access while allowing write access to authenticated users.
anon-access = none
auth-access = write

Uncomment the line
#password-db = passwd
This will tell svnserver that the password database to be used is named passwd and is in the same directory as that of svnserve.conf.
* It is a good idea to keep a common password database for all project that has to be accessed by the same users.

Uncomment the line
#realm = My First Repository

Edit the realm name to describe your Project, say

realm = Web Projects
* If you are planning to use the same user database for multiple projects, They all should have the same Realm. This will let the clients use the same cached passwords for all repositories with this realm name.

Now add users to the user database
Open C:\svnroot\samplepro\conf\passwd

Under the [users] section, delete the commented username password pairs
# harry = harryssecret
# sally = sallyssecret

then add your own usernames

safeer = af12@#dr$
murali = oh8$%q23

Now try accessing the repository via svn command line client.

winws07.safeer.in is the host name of this machine

C:\Temp>svn co –username=safeer svn://winws07.safeer.in/samplepro
Authentication realm: <svn://winws07.safeer.in:3690>> Web Projects
Username: safeer
Password for ’safeer’: ******
Checked out revision 0.

Now you can use Any GUI svn clients either as stand alone or as part of your IDE to access this repository.

If you want a stand alone client for windows, go for Tortoise SVN at http://tortoisesvn.tigris.org/
If you are using eclipse, you can get the sub ecliepse pluggin for SVN. This varies with your IDE. Even if your IDE doesn’t support SVN, you can use custom scripts to do the job, depending upon the OS platform you use.

1 comment:


  1. càng thấy quen mắt.

    Trung niên thư sinh thở dài nói:

    - Lão Liễu, giao ra đi. Mặc dù là Đông gia đã biết, nhưng cũng không thể

    trách cứ chúng ta, đối phương chính là tiên nhân. Chúng ta không cách

    nào ngăn cản đâu.

    Liễu Tam do dự một chút, bất đắc dĩ từ trong lòng cẩn thận lấy ra một chiếc hộp gấm nhỏ, đặt ở trên mặt đất.

    Hộp gấm vừa mới chạm đất đột nhiên bay lên, nó không hề bay về phía

    trước như tưởng tượng mà lại bay về phía sau rơi vào trong tay Vương

    Lâm.
    Chương 76: Phi kiếm cổ quáidịch vụ kế toán thuế trọn gói trung tâm kế toán tại tphcm ngoduong học kế toán tại cầu giấy kế toán cho giám đốc chung cư newskyline văn quán chung cư goldmark city học kế toán phần mềm misa meomeo007 01embesexy trung tâm kế toán tại hà đông chung cư hà nội trung tâm kế toán tại thanh xuân dịch vụ kế toán thuế dịch vụ báo cáo tài chính

    Liễu Tam quay đầu lại phía sau, nghiến răng nghiến lợi nói:

    - Ngươi quả nhiên là gian tế.

    Sắc mặt Dương Sâm lộ ra vẻ phẫn nộ, nhìn chằm chằm Vương Lâm, nắm chặt

    tay. Về phần hán tử mặt đen thì thu hồi lại ánh mắt của mình, hắn vừa

    ReplyDelete