Error 

Changing Trac default values for new environments

251 views
Posted June 9, 2007 at 03:06am in Computers, Programming

I have enjoyed the subversion integration in trac when viewing revisions and plan to use trac more often, but the problem is that I didn’t like milestone1, milestone2, etc. I decided to make a few changes to the source to allow for something that fits my projects a little better.

In PYTHON_ROOT/site-packages/trac/db_default.py

Python [Show Plain Code]:
  1. ##
  2. ## Default database values
  3. ##
  4.  
  5. # (table, (column1, column2), ((row1col1, row1col2), (row2col1, row2col2)))
  6. def get_data(db):
  7.    return ((‘component’,
  8.              (‘name’, ‘owner’),
  9.                ((‘component1′, ’somebody’),
  10.                 (‘component2′, ’somebody’))),
  11.            (‘milestone’,
  12.              (‘name’, ‘due’, ‘completed’),
  13.                ((‘milestone1′, 0, 0),
  14.                 (‘milestone2′, 0, 0),
  15.                 (‘milestone3′, 0, 0),
  16.                 (‘milestone4′, 0, 0))),
  17.                 …….

Unless I am wrong chaning the values of the milestones is all you will need to do. I tested it with a new environment and it appeared to work properly.

  • Google
  • del.icio.us
  • Digg
  • Spurl
  • Facebook


Leave a Reply