Modify ↓
Opened 7 years ago
Closed 7 years ago
#13036 closed defect (fixed)
AttributeError: 'tuple' object has no attribute 'rev'
| Reported by: | Ryan J Ollos | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | plugin - mercurial |
| Component: | plugin/mercurial | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: |
Fix compatibility of blame view with newer Mercurial versions. |
||
| API Changes: | |||
| Internal Changes: | |||
Description
Seen in the logs, may just be an invalid request, but it would be good to avoid the traceback.
[pid 3126 140365895681792] 2018-06-01 04:30:21,795 Trac[main] ERROR: [144.76.64.79] Internal Server Error: <RequestWithSession "GET '/browser/mirror/trac/env.py?annotate=blame&rev=fa8c151057237b911701496b1cbaf8d58b12767e'">, referrer None
Traceback (most recent call last):
File "/usr/local/virtualenv/1.3dev/lib/python2.7/site-packages/trac/web/main.py", line 664, in _dispatch_request
dispatcher.dispatch(req)
File "/usr/local/virtualenv/1.3dev/lib/python2.7/site-packages/trac/web/main.py", line 249, in dispatch
resp = chosen_handler.process_request(req)
File "/usr/local/virtualenv/1.3dev/lib/python2.7/site-packages/trac/versioncontrol/web_ui/browser.py", line 405, in process_request
file_data = self._render_file(req, context, repos, node, rev)
File "/usr/local/virtualenv/1.3dev/lib/python2.7/site-packages/trac/versioncontrol/web_ui/browser.py", line 732, in _render_file
force_source=bool(annotate))
File "/usr/local/virtualenv/1.3dev/lib/python2.7/site-packages/trac/mimeview/api.py", line 1006, in preview_data
annotations, force_source=force_source)
File "/usr/local/virtualenv/1.3dev/lib/python2.7/site-packages/trac/mimeview/api.py", line 821, in render
return self._render_source(context, result, annotations)
File "/usr/local/virtualenv/1.3dev/lib/python2.7/site-packages/trac/mimeview/api.py", line 847, in _render_source
data = (annotator, annotator.get_annotation_data(context))
File "/usr/local/virtualenv/1.3dev/lib/python2.7/site-packages/trac/versioncontrol/web_ui/browser.py", line 874, in get_annotation_data
return BlameAnnotator(self.env, context)
File "/usr/local/virtualenv/1.3dev/lib/python2.7/site-packages/trac/versioncontrol/web_ui/browser.py", line 978, in __init__
self.reset()
File "/usr/local/virtualenv/1.3dev/lib/python2.7/site-packages/trac/versioncontrol/web_ui/browser.py", line 985, in reset
self.annotations = node.get_annotations()
File "build/bdist.linux-x86_64/egg/tracext/hg/backend.py", line 1226, in get_annotations
annotations.append(fc.rev() or '0')
AttributeError: 'tuple' object has no attribute 'rev'
Attachments (0)
Change History (3)
comment:1 by , 7 years ago
comment:3 by , 7 years ago
| Release Notes: | modified (diff) |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
Pushed patch from #13047 with test in [56/mercurial-plugin].
Note:
See TracTickets
for help on using tickets.



The return value of
context.annotate()has been changes in the following versions: