Modify

Opened 6 years ago

Last modified 5 years ago

#4486 new defect

Possible bug related to "packages.pth"

Reported by: anonymous Owned by: doki_pen
Priority: normal Component: TracSvnPoliciesPlugin
Severity: major Keywords:
Cc: Trac Release: 0.11

Description

What version are you using?

Checkout revision 5144 for Trac 0.11.

What were you doing when the problem occured?

  1. edit svnpolicy.conf
  2. setup.py bdist_egg
  3. cp dist/TracSVNPoliciesPlugin-0.2-py2.5.egg /path/to/tracroot/plugins
  4. edit /path/to/tracroot/conf/trac.ini
  5. enable "Require log messages for commits" on the Administration UI
  6. try to commit something without a log message

What happened? What did you expect to happen instead?

Traceback (most recent call last):
File "./hooks/pre-commit", line 3, in <module>
from loader import *
File "./.egg-cache/TracSVNPoliciesPlugin-0.2-py2.5.egg-tmp/svnpolicies/hooks/loader.py", line 39, in <module>
from svnpolicies import api
ImportError: No module named svnpolicies

instead of

the log message isn't conform to the project policy!

Any additional info?

Patch the following file like this:

Index: svnpolicies/api.py
===================================================================
--- svnpolicies/api.py  (revision 5144)
+++ svnpolicies/api.py  (working copy)
@@ -15,7 +15,7 @@
       'get_site_packages']

 def get_site_packages():
-    return path.sep.join(__file__.split(path.sep)[:-3])
+    return path.sep.join(__file__.split(path.sep)[:-2])

 def validate_email(email):
     """

or change

/path/to/tracroot/plugins

manualy to something like this

/path/to/tracroot/plugins/TracSVNPoliciesPlugin-0.2-py2.5.egg

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by doki_pen

  • Owner changed from andrei2102 to doki_pen

comment:2 Changed 5 years ago by tekknokrat

Just tried to adapt the above patch but it failed. Message on commits remains the same.
Config is the same, as above. What else to try?

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.