Modify

Opened 15 years ago

Closed 3 years ago

#6032 closed defect (worksforme)

How to configure and Installation issue

Reported by: lmar@… Owned by: Jörg Viola
Priority: highest Component: CodeReviewPlugin
Severity: blocker Keywords:
Cc: Stjujsckij Nickolaj Trac Release: 0.11

Description

How to configure that hack ?

Attachments (1)

codereview.model.diff (1.2 KB) - added by Stjujsckij Nickolaj 15 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 15 years ago by anonymous

Owner: changed from Jörg Viola to anonymous
Status: newassigned

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 Changed 15 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 15 years ago by Ryan J Ollos

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 Changed 15 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 15 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 15 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 15 years ago by anonymous

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

comment:8 Changed 15 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 15 years ago by anonymous

Priority: normalhighest
Severity: normalblocker

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

comment:10 Changed 15 years ago by rleni59@…

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

comment:11 Changed 15 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 15 years ago by Stjujsckij Nickolaj

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 15 years ago by Stjujsckij Nickolaj

Attachment: codereview.model.diff added

comment:13 Changed 15 years ago by Stjujsckij Nickolaj

Cc: Stjujsckij Nickolaj added; anonymous removed

comment:14 Changed 15 years ago by Ryan J Ollos

Owner: changed from anonymous to Jörg Viola
Status: assignednew

comment:15 Changed 3 years ago by Ryan J Ollos

Resolution: worksforme
Status: newclosed

Installation issue.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jörg Viola.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.