Setting Up Subversion Server on Ubuntu

Step 1: Installing the Subversion package

#apt-get install subversion

Step 2:  Configure Subversion Directory

#mkdir –p  /home/svn/repository

Step 3: Configure Subversion group

#groupadd svn

#chgrp svn /home/svn/repository

#chmod g+rw /home/svn/repository

(you need to make sure that all new files and directories created in the repos directory (in other words, anything committed to the repositories) will also be owned by the group)

#chmod g+s /home/svn/repository

#usermod –a –G svn user1 (Assign users to svn group)

#usermod –a –G svn user2 (Assign users to svn group)

Step 4: Creating a New repository

#svnadmin create /home/svn/repository/test

Step 5: Checkout Repository

#svn checkout file:///home/svn/repository/test

Output: Checked out revision 0

Step 6: Add new files to Empty repository

#cd test

# echo ‘Hello, World!’ > hello.txt

#svn add hello.txt

Output : A         hello.txt

Step 7 : Commit files

#svn commit -m “Added a ‘hello world’ text file.”

Output :

Adding         hello.txt

Transmitting file data .

Committed revision 1.  Website Maintenance Services 

To know more about our web and mobile development service visit http://evincetech.com.
For more information, please contact us with the specifications for your project. You can email our sales team at info@evincetech.com, also you can call us at following numbers.
India: (+91) 44 42170775, (+91) 91766 40375
USA [Toll Free]: 866 220 6565

Components in a subversion system

Subversion’s Components

  1. svn : The command-line client program.
  2. svnversion: A program for reporting the state (in terms of revisions of the items present) of a working copy.
  3. svnlook: A tool for directly inspecting a Subversion repository.
  4. svnadmin: A tool for creating, tweaking, or repairing a Subversion repository. Web Development Company India
  5. mod_dav_svn: A plug-in module for the Apache HTTP Server, used to make your repository available to others over a network.
  6. svnserve: A custom standalone server program, runnable as a daemon process or invokable by SSH; another way to make your repository available to others over a network.
  7. svndumpfilter: A program for filtering Subversion repository dump streams.
  8. svnsync: A program for incrementally mirroring one repository to another over a network.
  9. svnrdump: A program for performing repository history dumps and loads over a network.
To know more about our web and mobile development service visit http://evincetech.com.
For more information, please contact us with the specifications for your project. You can email our sales team at info@evincetech.com, also you can call us at following numbers.
India: (+91) 44 42170775, (+91) 91766 40375
USA [Toll Free]: 866 220 6565

Use of svn in web application

Subversion manages files and directories, and the changes made to them, over time. This allows you to recover older versions of your data or examine the history of how your data changed. In this regard, many people think of a version control system as a sort of “time machine.”

Managing web applications in SVN is tricky for some reasons:

When using revision control, a programmer is always working on a ‘working copy’ of the project. In traditional software engineering, this copy is somewhere on the his machine, as it’s a stand-alone application. In web development, however, we’re talking about webspace. Should every developer have a PHP environment on his machine then? Shouldn’t all programmers work on the exact same server configuration? What about Windows and Mac users? Web Application Development India

This means the working copies should be best on one webserver, along with an SVN client. Thus, we need some interface (the most simple one being SSH) to access it. Maybe a rich web client would be even better.

The application needs to be deployed to a live webspace. This might happen quite often and should be as painless as possible.

Version Control Terminologies

Let us start by discussing some of the terms that we will be using in this tutorial.

Repository: A repository is the heart of any version control system. It is the central place where developers store all their work. Repository not only stores files but also the history. Repository is accessed over a network, acting as a server and version control tool acting as a client. Clients can connect to the repository, and then they can store/retrieve their changes to/from repository. By storing changes, a client makes these changes available to other people and by retrieving changes, a client takes other people’s changes as a working copy.

Trunk: The trunk is a directory where all the main development happens and is usually checked out by developers to work on the project.

Tags : The tags directory is used to store named snapshots of the project. Tag operation allows to give descriptive and memorable names to specific version in the repository.

Branches: Branch operation is used to create another line of development. It is useful when you want your development process to fork off into two different directions. For example, when you release version 5.0, you might want to create a branch so that development of 6.0 features can be kept separate from 5.0 bug-fixes.

Working copy: Working copy is a snapshot of the repository. The repository is shared by all the teams, but people do not modify it directly. Instead each developer checks out the working copy. The working copy is a private workplace where developers can do their work remaining isolated from the rest of the team.

Commit changes: Commit is a process of storing changes from private workplace to central server. After commit, changes are made available to all the team. Other developers can retrieve these changes by updating their working copy. Commit is an atomic operation. Either the whole commit succeeds or is rolled back. Users never see half finished commit.

To know more about our web and mobile development service visit http://evincetech.com.
For more information, please contact us with the specifications for your project. You can email our sales team at info@evincetech.com, also you can call us at following numbers.
India: (+91) 44 42170775, (+91) 91766 40375
USA [Toll Free]: 866 220 6565