Modify

Opened 5 years ago

Last modified 5 years ago

#6032 new defect

How to configure and Installation issue

Reported by: lmar@… Owned by: viola
Priority: highest Component: CodeReviewPlugin
Severity: blocker Keywords:
Cc: sterkrig@… Trac Release: 0.11

Description

How to configure that hack ?

Attachments (1)

codereview.model.diff (1.2 KB) - added by krigstask 5 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 5 years ago by anonymous

  • Owner changed from viola to anonymous
  • Status changed from new to assigned

Sorry for not yet having documented that.
Standard procedure: Simply drop the egg into the plugin folder, and enable the plugin
via trac.ini or - perhaps preferrably - via the admin console: Choose Plugins, look for the plugin, click on it and check the "enabled" checkbox. Then "Apply changes".
You should then under permissions see a new action "CODE_REVIEW".
Assign the persmission to all your reviewers.

Ticket will be closed when properly documented.

comment:2 follow-up: Changed 5 years ago by anonymous

This is my plugins dir:

# ls -la /home/trac/madm/plugins/|grep Code
-rw-r--r-- 1 trac webdev 6197 Oct 26 11:56 CodeReview-0.1-py2.4.egg

This is from config.ini:
# cat /home/trac/madm/conf/trac.ini|grep code
codereview.*=enabled

But I doesn't see any changes in permissions and no codereview plugin in WebAdmin.

comment:3 in reply to: ↑ 2 Changed 5 years ago by rjollos

Replying to anonymous:

But I doesn't see any changes in permissions and no codereview plugin in WebAdmin.

I'm new to administering Trac, but I think you may need to restart Apache.

comment:4 follow-up: Changed 5 years ago by anonymous

Usually if I add new plugin it instantly appear in Webadmin. But I restart apache too - nothing changed.

comment:5 in reply to: ↑ 4 Changed 5 years ago by lijiang@…

Replying to anonymous:

Usually if I add new plugin it instantly appear in Webadmin. But I restart apache too - nothing changed.

The same thing occurs for me. Following is error information in trac.log

2009-10-28 15:42:55,717 Trac[loader] ERROR: Skipping "codereview = codereview": (can't import "ImportError: No module named db_default")

What can i do now?

By the way, I like the feature of plugin very much.

comment:6 Changed 5 years ago by anonymous

you can fix this error if you make the following change in the module codereview/model.py :

instead of

import db_default

it should be

import trac.db_default

After you make the change, rebuild the .egg package, copy it into trac "plugins" directory and restart apache. Plugin should appear in the administrative page under "Plugins".

comment:7 Changed 5 years ago by anonymous

  • Summary changed from CodeReview-0.1-py2.4.egg how to edit comments or review ? to How to configure and Installation issue

comment:8 Changed 5 years ago by anonymous

Ok, i'm change the model.py and plugin is appear in Admin page, but stil does not work, with error now:

File "/usr/lib/python2.4/site-packages/Trac-0.11.2.1-py2.4.egg/trac/web/main.py", line 432, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/Trac-0.11.2.1-py2.4.egg/trac/web/main.py", line 226, in dispatch
  data, content_type)
File "/usr/lib/python2.4/site-packages/Trac-0.11.2.1-py2.4.egg/trac/web/chrome.py", line 694, in render_template
  stream |= self._filter_stream(req, method, filename, stream, data)
File "/usr/lib/python2.4/site-packages/Genshi-0.5.1-py2.4-linux-i686.egg/genshi/core.py", line 128, in __or__File "/usr/lib/python2.4/site-packages/Trac-0.11.2.1-py2.4.egg/trac/web/chrome.py", line 781, in inner
  data)
File "build/bdist.linux-i686/egg/codereview/filter.py", line 23, in filter_streamFile "build/bdist.linux-i686/egg/codereview/filter.py", line 33, in _review_attrsFile "build/bdist.linux-i686/egg/codereview/model.py", line 27, in getFile "/usr/lib/python2.4/site-packages/Trac-0.11.2.1-py2.4.egg/trac/db/util.py", line 51, in execute
  return self.cursor.execute(sql)
File "/usr/lib/python2.4/site-packages/Trac-0.11.2.1-py2.4.egg/trac/db/sqlite_backend.py", line 58, in execute
  args or [])
File "/usr/lib/python2.4/site-packages/Trac-0.11.2.1-py2.4.egg/trac/db/sqlite_backend.py", line 50, in _rollback_on_error
  return function(self, *args, **kwargs)

comment:9 Changed 5 years ago by anonymous

  • Priority changed from normal to highest
  • Severity changed from normal to blocker

Please fix installation!
I dont see the plugin when installed with easy_install

comment:10 Changed 5 years ago by rleni59@…

We are experiencing the same issue. Please review and let us know how you fixed the issue.

comment:11 Changed 5 years ago by anonymous

Actually, the solution should be:

from trac import db_default

instead of

import db_default

Cannot try it myself right now, though, since it's SQLite-only plugin, and my Trac is backended with PostgreSQL. Maybe I'll fix it somehow and test more thoroughly.

comment:12 Changed 5 years ago by krigstask

Well, it seems to me, now it does work. But, alas, having seen the sources, can't say plugin does anything useful — reviews are created and... nothing else. I think I'd better look into PeerReviewPlugin, which is quite a bit more established and mature, both in features and code.

Still, here's dirty hackpatch which makes plugin "work" with PostgreSQL (probably without breaking SQLite3 compatibility).

Changed 5 years ago by krigstask

comment:13 Changed 5 years ago by krigstask

  • Cc sterkrig@… added

comment:14 Changed 5 years ago by rjollos

  • Owner changed from anonymous to viola
  • Status changed from assigned to new

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.