Modify

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#10287 closed defect (fixed)

Error on commit

Reported by: rjollos Owned by: otaku42
Priority: normal Component: TracHacks
Severity: normal Keywords:
Cc: hasienda, osimons Trac Release: 0.10

Description (last modified by rjollos)

I've seen the following error on commit:

post-commit hook failed (exit code 1) with output:
/srv/trac-hacks.org/svn/trachacks/hooks/post-commit: line 47: /var/trac/trachacks010/log/trac-hacks-post-commit.log: No such file or directory

Attachments (0)

Change History (12)

comment:1 Changed 2 years ago by rjollos

It looks like there are a couple of changes needed in /srv/trac-hacks.org/svn/trachacks/hooks/post-commit, and maybe pre-revprop-change as well.

I'm too tired to deal with this now, but will make the changes and test in the morning if someone doesn't beat me to it.

comment:2 Changed 2 years ago by otaku42

  • Status changed from new to assigned
  • Trac Release changed from 0.12 to 0.10

Should be fixed now. Please test and report back.

comment:3 Changed 2 years ago by rjollos

hasienda mentioned on IRC last evening that the post-commit hook is still not working, and I'm seeing the same thing. I had to manually insert ticket/8690.

comment:4 Changed 2 years ago by rjollos

Here is a hint. I still received the following email, even though there was not a comment inserted in the ticket:

#10292: Line number IDs are not necessarily unique
--------------------+---------------------------------------------------
--------------------+----
Reporter:  rjollos  |       Owner:  rjollos
    Type:  defect   |      Status:  new
Priority:  normal   |   Component:  LinenoMacro
Severity:  normal   |    Keywords:
 Release:  0.12     |
--------------------+---------------------------------------------------
--------------------+----
 In [11941], the `IHTMLPreviewAnnotator` that is utilized was changed to
`trac.mimeview.api.LineNumberAnnotator`, which includes an anchor for
each  line number. If there is more than one line-numbered code block in
a  resource, then the line numbers will not be unique.

 This was brought to my attention in the ticket for adding the feature
to  the Trac core, t:#10834.

--
Ticket URL: <https://trac-hacks.org/ticket/10292>
Trac Hacks - Plugins Macros etc. <http://trac-hacks.org> Trac Hacks -
Hosting for Trac Plugins, Macros, etc.

comment:5 Changed 2 years ago by rjollos

I ran a touch /srv/trac-hacks.org/trac/log/trac-hacks-post-commit.log, and after a commit the file is populated with:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/local/bin/trac-post-commit-hook-010", line 71, in <module>
    import re
ImportError: No module named re

comment:6 Changed 2 years ago by rjollos

(In [11970]) Refs #10287: Deleted 0.11 directory and renamed 0.12 directory to trunk.

comment:7 Changed 2 years ago by rjollos

  • Description modified (diff)

comment:8 Changed 2 years ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

Changed the first line of /usr/local/bin/trac-post-commit-hook-010:

#!/usr/local/pythonenv/TRAC-0.10/bin/python

->

#!/srv/trac-hacks.org/pve/bin/python

comment:9 Changed 2 years ago by rjollos

The only thing being added to the log on commit now is the benign:

/srv/trac-hacks.org/pve/lib/python2.6/site-packages/trac/util/__init__.py:21: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
/usr/lib/python2.6/dist-packages/spambayes/classifier.py:43: DeprecationWarning: the sets module is deprecated
  from sets import Set

comment:10 Changed 2 years ago by osimons

The DeprecationWarning should be gone now. No point having this message in the logs as long as we really only run released packages anyway.

I've added this:

import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)

to /etc/python2.6/sitecustomize.py

comment:11 Changed 2 years ago by osimons

Actually better to only hide the warnings for our Trac related code. I've moved the statements to a new /srv/trac-hacks.org/pve/lib/python2.6/sitecustomize.py file instead.

comment:12 Changed 2 years ago by rjollos

I added rjollos, hasienda and osimons in the pre-revprop-change hook as users that are allowed to edit log messages. The post-revprop-change hook needs to be configured to resync the edited revisions. I did the resync manually tonight when editing [12029].

Add Comment

Modify Ticket

Action
as closed The owner will remain otaku42.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.