Modify ↓
#13359 closed defect (fixed)
UnboundLocalError is raised when changeset_modified is invoked for non-cached repository
| Reported by: | Jun Omae | Owned by: | Jun Omae |
|---|---|---|---|
| Priority: | normal | Component: | TracBackLinkPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 1.0 |
Description
Originally reported on gdiscussion:trac-users:nKTGxW5K78w.
$ trac-admin /path/to/tracenv
Welcome to trac-admin 1.0.15
Interactive Trac administration console.
Copyright (C) 2003-2013 Edgewall Software
Type: '?' or 'help' for help on commands.
Trac [/path/to/tracenv]> changeset modified reponame 1234123412341234123412341234123412341234
17:51:36 Trac[api] WARNING: Exception caught while "changeset_modified"
Traceback (most recent call last):
File "/venv/local/lib/python2.7/site-packages/tracbacklink/api.py", line 290, in _invoke
return f(*args, **kwargs)
File "/venv/local/lib/python2.7/site-packages/tracbacklink/api.py", line 381, in _changeset_modified
self._resource_deleted('changeset', rev, 'repository',
UnboundLocalError: local variable 'rev' referenced before assignment
Attachments (1)
Change History (7)
Changed 8 years ago by
| Attachment: | t13359.diff added |
|---|
comment:1 Changed 8 years ago by
| Status: | new → accepted |
|---|---|
| Trac Release: | → 1.0 |
comment:2 Changed 8 years ago by
comment:4 Changed 8 years ago by
I applied the patch to tracbacklinkplugin-17023.zip. And now the messages are no longer in the log. And the back links seem to still be working.
Thanks!
Note: See
TracTickets for help on using
tickets.



I installed the latest version (tracbacklinkplugin-17023.zip) and restarted my Apache server. I see that the version of the plugin went from 1.0.5 to 1.0.8.
I checked in a changset and got this:
2018-01-22 13:33:37,009 Trac[api] WARNING: Exception caught while "changeset_modified" Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/tracbacklink/api.py", line 290, in _invoke return f(*args, **kwargs) File "build/bdist.linux-x86_64/egg/tracbacklink/api.py", line 381, in _changeset_modified self._resource_deleted('changeset', rev, 'repository', UnboundLocalError: local variable 'rev' referenced before assignmentOOC, should the change have only been in tests/api.py? That is all that is changed in the downloaded zip file.