{"id":330,"date":"2006-06-21T19:19:36","date_gmt":"2006-06-22T02:19:36","guid":{"rendered":"http:\/\/www.gubatron.com\/blog\/?p=330"},"modified":"2006-06-21T19:19:36","modified_gmt":"2006-06-22T02:19:36","slug":"trac-svn-the-best-shit-ever-for-your-software-project","status":"publish","type":"post","link":"https:\/\/www.gubatron.com\/blog\/trac-svn-the-best-shit-ever-for-your-software-project\/","title":{"rendered":"Trac + SVN : The best shit ever for your software project"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.edgewall.com\/gfx\/trac_logo.png?w=640\"><\/p>\n<p>The company I came to work for knew I had some experience with subversion (back at <a href=\"http:\/\/www.limewire.com\">LimeWire<\/a> and with the migration of <a href=\"http:\/\/www.frostwire.com\">Frostwire&#8217;s<\/a> CVS Repo no <a href=\"http:\/\/www.sf.net\">SourceForge.net<\/a> to Subversion) so that&#8217;s one of the first things I did here.<\/p>\n<p>Subversion is a pretty useful tool, specially if you play with the hooks, e.g., send emails to members of the teams on post-commit, or update a common sandbox on post-commit so that everyone can see how the trunk of your repository is at the moment (stable or not)&#8230;<\/p>\n<p>But it&#8217;s not nearly as cool if you&#8217;re not using Trac to manage the project.<\/p>\n<p>We needed a simple tool to handle Bug tracking, and this Tool has become my addiction ever since I finished configuring it, now I use it as a personal &#8220;post-it&#8221; tool, no more KDE Yellow post it notes (yeah, I quit a long time ago on the real post it notes), now I write everything down on Trac, and I pretty much have two geek addictions when it comes to work now:<\/p>\n<li>Try to clean all my tickets<\/li>\n<li>See how many commits and lines of code I added\/removed throuout the day<\/li>\n<p>The results are you&#8217;re being very productive and procastinate on crap like email, irc or IM.<\/p>\n<p>I stopped people comming to my desk, now they have to enter a ticket, and it seems people are liking the mix of svn+trac a lot. Even the graphic designers are using their command line on the macs to do their commits and we get all the diffs by mail. All this happened in like 3 weeks, pretty amazing acceptance to change where I work.<\/p>\n<p>but this post, is not to advertise or evangelize the tools I use for work (although so far I hope I got you pumped on using trac and subversion if you even know what I&#8217;m talking about), it&#8217;s to document how the hell I installed it.<\/p>\n<p>Installing trac was a painful process, I admit, and I&#8217;m still not done, just today I&#8217;m installing my first plugins, but so far, I have it set so that, we have &#8216;user accounts&#8217;, we can browse our repository and diffs through trac, and we can make references to revision changes on the wiki (cause yes, trac is also a wiki, so we&#8217;re also using it as our new intranet web page) just by putting something like &#8216;r35&#8217; , and that will automatically make a link when you submit a ticket or save a wiki page to the diff on r35.<\/p>\n<p>So before you hate me, know in advanced something I hated.<\/p>\n<p><strong>If you intend to use trac with subversion, trac must be on the same machine<\/strong><\/p>\n<p>Yes, it still doesn&#8217;t support browsing a remote repository. So what did I do?<\/p>\n<p>I have a cronjob that rsyncs the repository every 5 minutes. You can also have it the other way if the server where the repository isn&#8217;t as loaded as ours, you can do the rsync to the machine where trac lives on the subversion hook for post-commit.<\/p>\n<p>So here is the entries I put on my apache2.conf on the machine that runs trac.<br \/>\n<code><br \/>\n   #Mod python configuration<br \/>\n   SetHandler mod_python<br \/>\n   PythonHandler trac.web.modpython_frontend<br \/>\n   PythonOption TracEnv \/var\/www\/trac_projects\/flycell<br \/>\n   PythonOption TracUriRoot \/trac\/flycell<\/p>\n<p>   #Authentication configuration<br \/>\n   AuthType Basic<br \/>\n   AuthName \"Trac at Flycell.com\"<\/p>\n<p>   #Our password file<br \/>\n   AuthUserFile \/var\/www\/trac_projects\/flycell\/conf\/auth_file<\/p>\n<p>   Require valid-user<\/p>\n<p>   #Authentication configuration<br \/>\n   AuthType Basic<br \/>\n   AuthName \"Trac at Flycell.com\"<\/p>\n<p>   #Our password file<br \/>\n   AuthUserFile \/var\/www\/trac_projects\/flycell\/conf\/auth_file<\/p>\n<p>   Require valid-user<\/p>\n<p>  DAV svn<br \/>\n  SVNPath \/flycell_rsynced_svn<\/p>\n<p><\/code><\/p>\n<p>And here&#8217;s what&#8217;s on my trac.ini<br \/>\n<code><br \/>\n[wiki]<br \/>\nignore_missing_pages = false<\/p>\n<p>[changeset]<br \/>\nmax_diff_bytes = 10000000<br \/>\nwiki_format_messages = true<br \/>\nmax_diff_files = 0<\/p>\n<p>[logging]<br \/>\nlog_file = trac.log<br \/>\nlog_level = DEBUG<br \/>\nlog_type = stderr<\/p>\n<p>[trac]<br \/>\ndefault_charset = iso-8859-15<br \/>\nignore_auth_case = false<br \/>\npermission_store = DefaultPermissionStore<br \/>\ncheck_auth_ip = true<br \/>\ndatabase = sqlite:db\/trac.db<br \/>\nauthz_module_name =<br \/>\ntemplates_dir = \/usr\/share\/trac\/templates<br \/>\ndefault_handler = WikiModule<br \/>\nbase_url = http:\/\/192.168.208.230\/trac\/flycell<br \/>\nmetanav = login,logout,settings,help,about<br \/>\nhtdocs_location =<br \/>\nmainnav = wiki,timeline,roadmap,browser,tickets,newticket,search<br \/>\nrepository_type = svn<br \/>\nrepository_dir = \/flycell_rsynced_svn\/trunk\/1.0\/<br \/>\nauthz_file = \/var\/www\/trac_projects\/flycell\/conf\/auth_file<br \/>\nauthz_module_name = flycell_svn_repo<\/p>\n<p>[project]<br \/>\nurl = http:\/\/192.168.208.230:8000<br \/>\nicon = common\/trac.ico<br \/>\nname = Flycell.com<br \/>\ndescr = Flycell.com Project Management<br \/>\nfooter = Visit the Trac open source project at<br \/><a href=\"http:\/\/trac.edgewall.com\/\">http:\/\/trac.edgewall.com\/<\/a><\/p>\n<p>[notification]<br \/>\nalways_notify_owner = true<br \/>\nsmtp_always_cc = true<br \/>\nsmtp_password =<br \/>\nsmtp_enabled = true<br \/>\nsmtp_replyto =<br \/>\nsmtp_port = 25<br \/>\nalways_notify_reporter = true<br \/>\nsmtp_from = trac-do-not-reply@flycell.com<br \/>\nsmtp_server = mail.flycell.com<br \/>\nsmtp_always_bcc = me@flycell.com someone@flycell.com<br \/>\nmime_encoding = base64<br \/>\nmaxheaderlen = 160<br \/>\nuse_public_cc = true<br \/>\nsmtp_user =<\/p>\n<p>[header_logo]<br \/>\nsrc = http:\/\/www.flycell.com\/template\/shared\/images\/logo.gif<br \/>\nalt =<br \/>\nheight = 63<br \/>\nlink = .\/<br \/>\nwidth = 157<\/p>\n<p>[mimeviewer]<br \/>\nphp_path = php<br \/>\nenscript_path = enscript<br \/>\ntab_width = 8<br \/>\nmax_preview_size = 262144<\/p>\n<p>[attachment]<br \/>\nrender_unsafe_content = false<br \/>\nmax_size = 262144<\/p>\n<p>[timeline]<br \/>\nchangeset_show_files = 0<br \/>\nticket_show_details = false<br \/>\ndefault_daysback = 30<br \/>\nchangeset_long_messages = false<\/p>\n<p>[ticket]<br \/>\ndefault_version =<br \/>\ndefault_component = flycell.com<br \/>\ndefault_type = defect<br \/>\nrestrict_owner = false<br \/>\ndefault_milestone =<br \/>\ndefault_priority = major<\/p>\n<p>[browser]<br \/>\nhide_properties = svk:merge<br \/>\ndownloadable_paths = ['\/trunk', '\/branches\/*', '\/tags\/*']<br \/>\n<\/code><\/p>\n<p>That trac ini took a long time to figure out, specially for the subversion repository, until I found out It couldn&#8217;t work remotely, then I had permission problems  that I finally resolved after hours and hours of googling that I had to have this at the end of my authz_file&#8230;.<\/p>\n<p><code><br \/>\n[auth]<br \/>\nusernameHere:z6unzMUVK6s.o<br \/>\nanotherUserHere:dkajsl22dsjkl<\/p>\n<p>[flycell_svn_repo:\/]<br \/>\n* = rw<br \/>\n<\/code><\/p>\n<p>The [auth] section of that file, contains users and crypted passwords created with<br \/>\n<code><br \/>\nhtpasswd2 -nb username passwordhere<br \/>\n<\/code><\/p>\n<p>I basically copied and pasted the output on that file, and that served as my .htpasswd file for a while, until I knew that It had to have the name of the repository there&#8230; as specified on the trac.ini<\/p>\n<p>They should make all this more clear, thank god there are other geeks like me who like to document stuff.<\/p>\n<p>Hope you find this post useful in the future if configuring trac.<\/p>\n<p>I&#8217;m not gonna cover how to install the plugins cause I&#8217;m not done yet with that, but it&#8217;s going smooth, just know that you&#8217;ll need to install a <a href=\"http:\/\/peak.telecommunity.com\/dist\/ez_setup.py\">script<\/a> before hand. I actually installed already the TracWebAdmin cause I need to give people access to the management of trac and I don&#8217;t want to have them on the console cause they&#8217;ll get lost.<\/p>\n<p>Enjoy<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The company I came to work for knew I had some experience with subversion (back at LimeWire and with the migration of Frostwire&#8217;s CVS Repo no SourceForge.net to Subversion) so that&#8217;s one of the first things I did here. Subversion is a pretty useful tool, specially if you play with the hooks, e.g., send emails [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[15,30,33,43,68],"tags":[],"class_list":["post-330","post","type-post","status-publish","format-standard","hentry","category-code","category-geeklife","category-gubatron","category-linux","category-random-stuff"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5Unzf-5k","jetpack-related-posts":[{"id":2068,"url":"https:\/\/www.gubatron.com\/blog\/bitbucket-or-github\/","url_meta":{"origin":330,"position":0},"title":"Bitbucket or Github?","author":"gubatron","date":"September 28, 2010","format":false,"excerpt":"This week we have to make a final choice of what technology will be used to replace our somewhat big subversion repository (2 Gigs). Huge imports are beginning to be a pain and we're tired of the .svn folders and not being able to commit if the central server is\u2026","rel":"","context":"In &quot;Geeklife&quot;","block_context":{"text":"Geeklife","link":"https:\/\/www.gubatron.com\/blog\/category\/geeklife\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2087,"url":"https:\/\/www.gubatron.com\/blog\/mercurial-for-subversion-expats-merging-remote-changes-abort-push-creates-new-remote-heads\/","url_meta":{"origin":330,"position":1},"title":"Mercurial for Subversion Expats: Merging remote changes. &#8220;abort: push creates new remote heads!&#8221;","author":"gubatron","date":"November 14, 2010","format":false,"excerpt":"Commit anywhere\/anytime with Mercurial So you have been using subversion for the past few years and now your team has decided to move on to Mercurial for all the benefits. Two or more people are working on the same branch and they're pushing code to the main copy of the\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":485,"url":"https:\/\/www.gubatron.com\/blog\/como-instalar-subversion-140-en-ubuntu\/","url_meta":{"origin":330,"position":2},"title":"Como instalar Subversion 1.4.0 en Ubuntu","author":"gubatron","date":"March 23, 2007","format":false,"excerpt":"Desde hace unos dias estaba trabajando con una extension de eclipse para sincronizar codigo en un repositorio de subversion, y despues de utilizar la bendita extension (o quizas fue que actualizaron el servidor subversion...) me empezo a salir este maldito error cuando intentaba utilizar subversion desde la linea de comandos:\u2026","rel":"","context":"In &quot;Geeklife&quot;","block_context":{"text":"Geeklife","link":"https:\/\/www.gubatron.com\/blog\/category\/geeklife\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":542,"url":"https:\/\/www.gubatron.com\/blog\/how-to-update-the-location-of-your-subversion-repo-without-checking-out-again-everything\/","url_meta":{"origin":330,"position":3},"title":"How to update the location of your subversion Repo without checking out again everything","author":"gubatron","date":"July 10, 2007","format":false,"excerpt":"So you checked out code from a place, and whoever runs your subversion server decided to change the URL, or decided to switch from http:\/\/ to https:\/\/ or to svn+ssh:\/\/ ... If you're a noob, you'll probably just checkout everything again. Next time this happens just use svn switch Here's\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":651,"url":"https:\/\/www.gubatron.com\/blog\/video-linus-habla-sobre-git-su-subversion-distribuido\/","url_meta":{"origin":330,"position":4},"title":"VIDEO: Linus habla sobre GIT, su &#8220;subversion&#8221; distribuido","author":"gubatron","date":"February 2, 2008","format":false,"excerpt":"Aqui hay un Google talk por el mismisimo Linus, quien habla sobre su nuevo sistema de control de versiones distribuido. El cual promete se mas rapido, distribuido, y ocupar menos espacio. Algunos claman que pudiera utilizarse como un sistema de archivos distribuidos que nos permitira crear sistemas que antes eran\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":788,"url":"https:\/\/www.gubatron.com\/blog\/blooploader-06-is-hardy-compatible\/","url_meta":{"origin":330,"position":5},"title":"Blooploader 0.6 is Hardy compatible","author":"gubatron","date":"April 26, 2008","format":false,"excerpt":"Blooploader 0.6 running on Hardy. Currently available only via subversion. For our Linux users, you can safely update to Ubuntu Hardy if the one thing holding your breath was compatibility with the Blooploader. Currently we run the Blooploader in Linux from source, you just need to have installed, Qt4, sip4,\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/comments?post=330"}],"version-history":[{"count":0,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/330\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/media?parent=330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/categories?post=330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/tags?post=330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}