Friday, December 21, 2012

Back on Trac

This is a follow on to my recent post about installing Trac on Ubuntu. I had installed Trac 12.1, served from Ubuntu 12.04, but running in Virtual Box.

Now I have a real live Mac Pro to play with. However, the Ubuntu is crusty old 11.04 but I did not install it and I don't know who did.. .I have 0 experience installing on the Mac, and am not ready to take the plunge and risk bricking the Mac Pro. The reason this is relevant is because this time when I install Trac, I don't want to go the apt-get route, because it will load version 11 of Trac.

Instead, I am going to use easy_install to get the latest Trac 1.0. There are two different references I am using:

UbuntuTracHowto: SVN + Apache + Trac setup. Installs Trac by apt-get.

Robert Basic: I used this reference for installation of Trac via easy_install, but I don't do the wsgi stuff.

At this point, I can now browse the minimal Trac setup. I don't want to bore you with the mundane details of setting permissions and what-not.... what's next:

Enable WebAdmin

Setup source code repository:  go to "Administration: Repositories" and add the path to the repository. Trac responds with the the following:

  • The repository "test_repo_trac" has been added.
  • You should now run trac-admin $ENV repository resync "test_repo_trac" to synchronize Trac with the repository. e.g. trac-admin /var/lib/trac/my_trac_proj/ repository resync "*"
  • You should also set up a post-commit hook on the repository to call trac-admin $ENV changeset added "test_repo_trac" $REV for each committed changeset.
... so here is what I put in my hooks/post-commit:


#  /var/www/.python-eggs
# export PYTHON_EGG_CACHE="/var/lib/trac"

trac-admin /var/lib/trac/mytracproj/ changeset added "$1" "$2"


Issue:  Source Browser doesn't show up on the Trac page.

Try apt-get install python-subversion.

Try removing the repository from the Admin screen, and re-added it. The following error was shown:

Can't synchronize with repository "(default)" (Unsupported version control system "svn": Can't find an appropriate component


In Trac 1.0 (trunk, starting from r11082), the components for Subversion support must be explicitly enabled in trac.ini [components] section:

tracopt.versioncontrol.svn.* = enabled

... or by going into Admin | General | Plugins (Manage Plugins), and selecting the component in the Trac 1.0 plugin.


CommitTicketUpdater is working after following the instructions to enable components CommitTicketReferenceMacro and CommitTicketUpdater. 


CodeReviewerPlugin working.


No comments:

Post a Comment