#13047 closed defect (duplicate)
TypeError: 'annotateline' object is not iterable
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | plugin/mercurial | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
After upgrading Mercurial, Trac blame doesn't work anymore:
2018-06-19 10:29:04,944 Trac[api] WARNING: HTML preview using PygmentsRenderer with <RenderingContext <Resource u'repository:R1, source:R1/a.c@deba02c781bc32a84b7f1d63e216912306ae71fd8a6'>> failed: Traceback (most recent call last): File "build\bdist.win32\egg\trac\mimeview\api.py", line 811, in render return self._render_source(context, result, annotations) File "build\bdist.win32\egg\trac\mimeview\api.py", line 848, in _render_source data = (annotator, annotator.get_annotation_data(context)) File "build\bdist.win32\egg\trac\versioncontrol\web_ui\browser.py", line 875, in get_annotation_data return BlameAnnotator(self.env, context) File "build\bdist.win32\egg\trac\versioncontrol\web_ui\browser.py", line 981, in __init__ self.reset() File "build\bdist.win32\egg\trac\versioncontrol\web_ui\browser.py", line 988, in reset self.annotations = node.get_annotations() File "build\bdist.win32\egg\tracext\hg\backend.py", line 1225, in get_annotations for fc, line in self.filectx.annotate(follow=True): TypeError: 'annotateline' object is not iterable 2018-06-19 10:29:05,010 Trac[api] WARNING: HTML preview using PlainTextRenderer with <RenderingContext <Resource u'repository:R1, source:R1/a.c@a02c781bc32a84b7f1d63e216912306ae71fd8a6'>> failed: Traceback (most recent call last): File "build\bdist.win32\egg\trac\mimeview\api.py", line 811, in render return self._render_source(context, result, annotations) File "build\bdist.win32\egg\trac\mimeview\api.py", line 848, in _render_source data = (annotator, annotator.get_annotation_data(context)) File "build\bdist.win32\egg\trac\versioncontrol\web_ui\browser.py", line 875, in get_annotation_data return BlameAnnotator(self.env, context) File "build\bdist.win32\egg\trac\versioncontrol\web_ui\browser.py", line 981, in __init__ self.reset() File "build\bdist.win32\egg\trac\versioncontrol\web_ui\browser.py", line 988, in reset self.annotations = node.get_annotations() File "build\bdist.win32\egg\tracext\hg\backend.py", line 1225, in get_annotations for fc, line in self.filectx.annotate(follow=True): TypeError: 'annotateline' object is not iterable
- Trac 1.3.2dev
- Mercurial 4.6
- tracmercurial 1.0.0.7 source:mercurial-plugin@51 (d9139f9a3601)
Attachments (0)
Change History (7)
follow-up: 3 comment:1 by , 6 years ago
comment:2 by , 6 years ago
Milestone: | plugin - mercurial |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
A duplicate of #13036.
comment:3 by , 6 years ago
Guessing from https://www.mercurial-scm.org/repo/hg/file/tip/mercurial/context.py#l888 I tried this change: […]
The patch seems to be good with all versions of mercurial (3.8, 3.9, 4.6). Thanks.
comment:4 by , 6 years ago
(I only searched search:annotateline+iterable and missed the other ticket.)
follow-up: 6 comment:5 by , 6 years ago
BTW is there a reason TracMercurial#Releases does not mention version 1.0.0.5 to 1.0.0.8, compatibility with Trac 1.2+ / hg 3.2+?
comment:6 by , 6 years ago
Replying to anonymous:
BTW is there a reason TracMercurial#Releases does not mention version 1.0.0.5 to 1.0.0.8, compatibility with Trac 1.2+ / hg 3.2+?
I suspect the page hasn't been updated with recent releases. Please feel free to update it.
Guessing from https://www.mercurial-scm.org/repo/hg/file/tip/mercurial/context.py#l888 I tried this change:
tracext/hg/backend.py
And it seems to work.