How to Track SVN activities Including commit , Checkin and update..etc

Subversion is a free/open source version control system (VCS). That is, 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.

Subversion can operate across networks, which allows it to be used by people on different computers. At some level, the ability for various people to modify and manage the same set of data from their respective locations fosters collaboration. Progress can occur more quickly without a single conduit through which all modifications must occur. And because the work is versioned, you need not fear that quality is the trade-off for losing that conduit—if some incorrect change is made to the data, just undo that change.

Authenticated user can login and Checkout the code from anywhere if its allowed from server. 

To Track all the activites of the Svn users you can the accesslog from apache2 .

In your ubuntu system 
cd /var/log/apache2

in accesslog you will get all the logs related to the apache webser 
like below

[21/Oct/2015:16:31:21 +0530] "OPTIONS /svn/repo HTTP/1.1" 200 865 "-" "SVN/1.6.12 (r955767) neon/0.29.6"[21/Oct/2015:16:31:21 +0530] "PROPFIND /svn/repo HTTP/1.1" 207 582 "-" "SVN/1.6.12 (r955767) neon/0.29.6"[21/Oct/2015:16:31:21 +0530] "PROPFIND /svn/repo HTTP/1.1" 207 582 "-" "SVN/1.6.12 (r955767) neon/0.29.6"[21/Oct/2015:16:31:21 +0530] "PROPFIND /svn/!svn/vcc/default HTTP/1.1" 207 449 "-" "SVN/1.6.12 (r955767) neon/0.29.6"[21/Oct/2015:16:31:21 +0530] "PROPFIND /svn/!svn/bln/4538 HTTP/1.1" 207 463 "-" "SVN/1.6.12 (r955767) neon/0.29.6"[21/Oct/2015:16:31:21 +0530] "REPORT /svn/!svn/vcc/default HTTP/1.1" 200 734 "-" "SVN/1.6.12 (r955767) neon/0.29.6"

To view proper report for svn 
add this in the httpd.config

LogFormat "%{%Y-%m-%d %T}t %u@%h %>s repo:%{SVN-REPOS-NAME}e %{SVN-ACTION}e (%B Bytes in %T Sec)" svn

And the following line to default-server.conf:

CustomLog "/var/log/apache2/subversion_log" svn env=SVN-ACTION

Now you can see proper format report of svn activities like

2015-10-19 16:46:30 dharma@192.168.3.9 200 repo:myrepo checkout-or-export / r5317 depth=infinity

No comments :

Post a Comment