Modify ↓
#9477 closed defect (fixed)
CommitTicketReferenceMacro is broken, causes AttributeError: 'NoneType' object has no attribute 'resource'
Reported by: | anonymous | Owned by: | Remy Blank |
---|---|---|---|
Priority: | high | Milestone: | 0.12.1 |
Component: | version control | Version: | 0.12dev |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
When enabled causes:
AttributeError: 'NoneType' object has no attribute 'resource' File "/var/www/trac/egg-cache/Trac-0.12.1dev_r9930-py2.6.egg-tmp/trac/ticket/templates/ticket_change.html", line 61, in <Expression u'wiki_to_html(context, change.comment, escape_newlines=preserve_newlines)'> <py:otherwise>${wiki_to_html(context, change.comment, escape_newlines=preserve_newlines)}</py:otherwise> File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 1497, in format_to_html return HtmlFormatter(env, context, wikidom).generate(escape_newlines) File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 1452, in generate escape_newlines) File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 1194, in format self.handle_code_block(line, block_start_match) File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 1084, in handle_code_block processed = self.code_processor.process(code_text) File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 304, in process text = self.processor(text) File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 288, in _macro_processor text, self.args) File "build/bdist.linux-x86_64/egg/tracopt/ticket/commit_updater.py", line 290, in expand_macro formatter.context('changeset', rev, parent=repos.resource),
System Information:
User Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 Trac 0.12.1dev-r9930 Genshi 0.7dev-r1134 Mercurial 1.1.2 psycopg2 2.0.8 Pygments 0.10 Python 2.6.2 (release26-maint, Apr 19 2009, 02:15:38) [GCC 4.3.3] pytz 2008h setuptools 0.7a1 Subversion 1.5.4 (r33841) jQuery 1.2.6 Enabled Plugins: IniAdmin 0.2 /usr/local/lib/python2.6/dist-packages/IniAdmin-0.2-py2.6.egg TracMercurial 0.12.0.22dev-r9826 /usr/local/lib/python2.6/dist-packages/TracMercurial-0.12.0.22dev_r9826-py2.6.egg
Attachments (0)
Change History (5)
comment:1 by , 14 years ago
Component: | general → version control |
---|---|
Description: | modified (diff) |
Owner: | set to |
Version: | → 0.12dev |
follow-up: 3 comment:2 by , 14 years ago
Thanks for quick response. Renaming is possible. The trac.ini does reflect the correct repo name. Is there a work around?
comment:3 by , 14 years ago
Replying to anonymous:
Renaming is possible. The trac.ini does reflect the correct repo name.
The question was: did you rename the repository after the commit was done (and the comment added to the ticket)?
Is there a work around?
I have a fix, I just need to test it a bit and I'll commit it in a few minutes.
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in [9936]. Update your installation!
Note:
See TracTickets
for help on using tickets.
This happens if the repository referenced in the macro call doesn't exist. Did you happen to rename the repository?
The macro should be more robust against this.