Opened 7 years ago
Closed 6 years ago
#12920 closed defect (fixed)
TEXTNote: this is a STARTstrong-1-1TEXTmerge-1-1ENDstrong-1-1 changeset ...
Reported by: | anonymous | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | plugin - mercurial |
Component: | version control/changeset view | Version: | 1.3dev |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Fix garbled output in merge changeset view with Trac 1.3dev. |
||
API Changes: | |||
Internal Changes: |
Description
Changeset view contains strange text, for example changeset:a311aa01ebcb/mercurial-plugin/ looks like this:
Parents: 44:ed4f0932196b (diff), 45:7c49d0e31747 (diff) TEXTNote: this is a STARTstrong-1-1TEXTmerge-1-1ENDstrong-1-1 changeset, the changes displayed below correspond to the merge itself.-1-1 TEXTUse the STARTtt-1-1TEXT(diff)-1-1ENDtt-1-1 links above to see all the changes relative to each parent.-1-1
Maybe only for Mercurial repositories?
Attachments (1)
Change History (8)
by , 7 years ago
Attachment: | changeset_merge_diff_templating.png added |
---|
comment:1 by , 7 years ago
comment:3 by , 7 years ago
Keywords: | mercurial added |
---|
Properties in Git repository are correctly rendered, e.g. [857da2682/jomae.git].
comment:4 by , 7 years ago
Keywords: | mercurial removed |
---|---|
Milestone: | 1.3.3 → plugin - mercurial |
Owner: | set to |
Status: | new → assigned |
The mercurial-plugin directly depends Genshi library. We should import tag
from trac.util.html
to work on Trac 1.0 through 1.3dev.
-
tracext/hg/backend.py
diff -r 8a6b7b63f68d tracext/hg/backend.py
a b 25 25 26 26 import pkg_resources 27 27 28 from genshi.builder import tag29 30 28 from trac.core import * 31 29 from trac.config import BoolOption, ChoiceOption, ListOption, PathOption 32 30 from trac.env import ISystemInfoProvider 33 31 from trac.util import arity 34 32 from trac.util.datefmt import FixedOffset, utc 33 from trac.util.html import tag 35 34 from trac.util.text import exception_to_unicode, shorten_line, to_unicode 36 35 from trac.util.translation import _, domain_functions 37 36 from trac.versioncontrol.api import Changeset, Node, Repository, \
comment:5 by , 7 years ago
IIRC, we have to use from trac.util.html import html as tag
for compatibility with an early version of 1.0.x (< 1.0.2?)
comment:6 by , 6 years ago
comment:7 by , 6 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Thanks for the suggestion and reviews. Pushed the change in comment:5 ([d54f77082b03/mercurial-plugin]).
tag.span(Markup(_("Note: this is a <strong>merge" ...
tag.span(tag_("Note: this is a %(merge)s changeset, " ... merge=tag.strong('merge')),