Showing posts with label scm. Show all posts
Showing posts with label scm. Show all posts

Tuesday, July 10, 2007

Subversion, Apache(httpd), ViewCVS windows XP setup and configuration continued.....

We can have browser support for subversion repository without viewCVS. It is obvious we will miss most of the features provided by viewcvs but we can have repository browsing and network access of repository over HTTP protocol supported by subversion. To achieve this we need to have apache module (mod_dav_svn) installed at the time of installation of subversion and have to do some configuration changes to httpd.conf (Apache configuration) file.

Referring previous post...

During the installation of subversion make sure to check the option to install the apache module. Subversion installation will modify the Apache configuratuion to load the modules (dav_svn_module & authz_svn_module) with a similar entry like:

LoadModule dav_svn_module "C:/Program Files/Subversion/bin/mod_dav_svn.so"
LoadModule authz_svn_module "C:/Program Files/Subversion/bin/mod_authz_svn.so"


These two modules will handle the Subversion requests. We have to ensure that the LoadModule section of httpd.conf should have an entry of apache module dav_svn.so before mod_dav_svn.so & authz_svn_module.so.

We need to edit the httpd.conf file to point Apache to the subversion repository.
Add the following lines to the end of the httpd.conf file.


Subversion repositories are residing in C:/opt. We can have any number of repository in C:/opt and all will be available to Apache.

** We can browse repository with the URL as http://localhost/svn/svn-root
where svn-root is one of the repository in C:/opt. Localhost can be replaced by hostname OR IP address of the installed Apache box when one wants to browse repository over network.

** we can access the repository using SVN client as
svn list http://localhost/svn/svn-root


cheers, make world open...

Monday, June 04, 2007

Subversion, Apache(httpd), ViewCVS windows XP setup and configuration

Subversion, Apache HTTP server and viewcvs goes hand in gloves if one wants to run subversion as a version control(source control) for any production environment.

Followed the following steps to configure all three together.

1. Installed subversion1.4.3 from http://subvsersion.tigris.org version as svn-1.4.3-setup.exe

2. Installed the activestate python from ftp.activestate.com version as ActivePython-2.5.0.0-win32-x86.msi

3.
Installed svn-python binding for python2.5 and subversion1.4.3 from http://subversion.tigris.org version as svn-python-1.4.3.win32-py2.5.exe
  • One has to be very specific about the python, subversion and svn-python bindings. Ensure that the svn python binding versions should be same as that of subversion and python installed.
4. Test that the python shell can load svn-python bindings
  • launch C:/Python25/python.exe
  • from python shell enter : import svn.repos , it should not give any error trace.
  • exit python shell.
5. Got viewCVS from http://viewcvs.sourceforge.net version as viewvc-1.0.4.zip.
  • Unzipped viewvc-1.0.14.zip and renamed viewvc-1.0.4/viewvc-install as viewvc-1.0.4/viewvc-install.py and double-clicked it. This will ask some simple configuration query, i preferred default.
6. Edited C:/Program Files/viewvc-1.0.4/viewvc.conf
  • commented # cvs_roots = cvs: /home/cvsroot
  • Modified svnroots line as svn_roots = svn-root: c:/opt/svn-root , this is because i am having one svn repo named "svn-root" in C:/opt directory.
  • Modified root_parents line as root_parents = C:/opt : svn and removed ',' from the end of line.
  • Modified default_root line as default_root = svn-root
7. Test the viewcvs and subversion configuration and integration
  • Through command line run standalone.py -g from C:/Program Files/viewvc-1.0.4/bin/ location.
  • It will allow one to browse the repository with the default browser and if it works then only we can go further to integrate viewcvs with apache.
8. Installed apache httpd from http://www.apache.org as version apache_2.0.59-win32-x86-no_ssl.msi
  • Subversion win32 binaries are compiled for apache2.0.x and will not work with apache2.2.x.
  • "dav_svn_module in file /modules/mod_dav_svn.so is garbled" - perhaps this is not an apache module DSO ? This is the error one would get if tries to run apache-2.2.x with win32 subversion.
9. Edited httpd.conf file
  • Search for ScriptAlias in httpd.conf file and add one more line below all the ScriptAlias as ScriptAlias /viewcvs "C:/Program Files/viewvc-1.0.4/bin/cgi/viewvc.cgi"
  • Restart apache httpd server
  • Now, one can browse the repository.
10. One need GNU diffutils installed and in the PATH to enable the viewcvs feature of diff between two revisions. Get GNU diffutil from this Link...

cheers, make world open.