Edgewall Software

Changes between Version 5 and Version 6 of Ubuntu-11.04-Subversion


Ignore:
Timestamp:
Dec 17, 2010, 4:07:25 PM (13 years ago)
Author:
gacevedo@…
Comment:

Tutorial is almost completed.

Legend:

Unmodified
Added
Removed
Modified
  • Ubuntu-11.04-Subversion

    v5 v6  
    6464}}}
    6565
     66Start the Subversion server (or use your preferred method):
     67{{{
     68sudo svnserve -d
     69}}}
     70
    6671=== Setup the MySQL database ===
    6772
     
    109114}}}
    110115
    111 You will need to fill in some information, like the project name. Also, it will ask you for the MySQL connection string. Input the following (according to the way we did setup the MySQL database in the step 2.2).
     116You will need to fill in some information, like the project name. Pay attention to the question about the location of the Subversion project. Enter the path as discussed before:
     117{{{
     118/var/lib/svn/YourProject
     119}}}
     120
     121Also, it will ask you for the MySQL connection string. Input the following (according to the way we did setup the MySQL database in the step 2.2).
    112122{{{
    113123mysql://trac:yourpassword@localhost/trac
     
    164174Again, make sure you give exec perms to the script.
    165175
    166 ===== Automatic reference to the SVN changesets in Trac tickets =====
     176Now Trac will be notified about changes you make to your repository and will make them availables in the timeline.
    167177
    168178
     
    171181==== Set up Trac handling ====
    172182
     183Apache needs to know how to handle Trac. Use the following block to set up Trac handling:
     184{{{
     185<Location /projects> #set up Trac handling
     186    SetHandler mod_python
     187    PythonHandler trac.web.modpython_frontend
     188    PythonOption TracEnvParentDir /var/lib/trac
     189    PythonOption TracUriRoot /projects
     190</Location>
     191}}}
     192
     193Note that it's poiting to the main Trac directory. It means it will expose all of your Trac projects.
     194
    173195==== Authentication ====
    174196
    175 
    176 == Workflow examples ==
     197In order to allow users to log in Trac, you will need the following section in your Apache configuration:
     198{{{
     199<Location "/trac/login">
     200    AuthType Basic
     201    AuthName "Trac"
     202    AuthUserFile /var/tracprojects/.htpasswd
     203    Require valid-user
     204</Location>
     205}}}
     206
     207Go ahead and restart Apache:
     208{{{
     209sudo /etc/init.d/apache2 restart
     210}}}
     211
     212== Automatic reference to the SVN changesets in Trac tickets ==
     213
     214Something useful is to reference tickets on your commits. That way you can keep a better track of them and also easly access them from the timeline.
     215
     216Make sure you have the following line in your trac.ini configuration file:
     217{{{
     218tracopt.ticket.commit_updater.* = enabled
     219}}}
     220
     221Now, whenever you commit some change related to a ticket, use ''Refs #tn'' to reference this changeset in #tn ticket. For example:
     222{{{
     223svn commit -m "Refs #123 - added this and that"
     224}}}
     225
     226In order to mark a ticket as fixed, use the following:
     227{{{
     228svn commit -m "Fixes #123 - Removed an infinite loop which was causing the application to freeze"
     229}}}