Opened 4 years ago
events system not running if no repository installed
|Reported by:||hju||Owned by:||coling|
This is a nice pluging with a lot of very good ideas!
I apologize for creating another ticket.
We are using trac without any version control system (svn) because we are not managing software projects.
The event system is not running, if there is no repository defined.
python /root/inst/clientsplugin/0.11/cron/run-client-event -c "Ticket Changes" -e /path/to/env Traceback (most recent call last): File "/root/inst/clientsplugin/0.11/cron/run-client-event", line 97, in <module> RunClientEvents() File "/root/inst/clientsplugin/0.11/cron/run-client-event", line 87, in __init__ repos = self.env.get_repository() File "/usr/lib/python2.5/site-packages/trac/env.py", line 305, in get_repository return RepositoryManager(self).get_repository(authname) File "/usr/lib/python2.5/site-packages/trac/versioncontrol/api.py", line 149, in get_repository name=self.repository_type)) trac.core.TracError: Unsupported version control system "svn": Can't find an appropriate component, maybe the corresponding plugin was not enabled?
Obviously there is a check missing if a repository is defined. If I remove two lines of code in ´run-client-event´ line 87 and 88 I can pass this error.
class RunClientEvents: def __init__(self): locale.setlocale(locale.LC_ALL, '') self.env = open_environment(options.envpath) self.req = SendClientFakeReq() # Sync the repo so that any commits that happen to have been made # that include client comments are included. #>> repos = self.env.get_repository() #>> repos.sync()