Ticket #10287 (closed defect: fixed)

Opened 9 months ago

Last modified 8 months ago

Error on commit

Reported by: rjollos Assigned to: 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

Change History

09/06/12 06:32:46 changed 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.

09/06/12 08:59:04 changed by otaku42

  • release changed from 0.12 to 0.10.
  • status changed from new to assigned.

Should be fixed now. Please test and report back.

09/07/12 18:41:57 changed 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:6.

09/08/12 01:26:21 changed 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.

09/11/12 07:23:09 changed 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

09/11/12 07:28:18 changed by rjollos

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

09/11/12 07:29:10 changed by rjollos

  • description changed.

09/11/12 07:29:17 changed by rjollos

  • status changed from assigned to closed.
  • resolution set to fixed.

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

09/11/12 08:03:36 changed 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

09/11/12 09:26:40 changed 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

09/11/12 09:42:49 changed 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.

09/20/12 05:32:37 changed 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/Change #10287 (Error on commit)




Change Properties
Action