Edgewall Software

Opened 15 months ago

Closed 6 months 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:
Release Notes:

Fix garbled output in merge changeset view with Trac 1.3dev.

API Changes:


Changeset view contains strange text, for example changeset:a311aa01ebcb/mercurial-plugin/ looks like this:

    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)

changeset_merge_diff_templating.png (26.6 KB ) - added by anonymous 15 months ago.

Download all attachments as: .zip

Change History (8)

Changed 15 months ago by anonymous

comment:1 Changed 15 months ago by anonymous

  • Git: tag.span(Markup(_("Note: this is a <strong>merge" ...
  • Mercurial: tag.span(tag_("Note: this is a %(merge)s changeset, " ... merge=tag.strong('merge')),

comment:2 Changed 15 months ago by Jun Omae

Milestone: 1.3.3
Version: 1.3dev

Thanks for the reporting.

comment:3 Changed 15 months ago by Jun Omae

Keywords: mercurial added

Properties in Git repository are correctly rendered, e.g. [857da2682/jomae.git].

comment:4 Changed 15 months ago by Jun Omae

Keywords: mercurial removed
Milestone: 1.3.3plugin - mercurial
Owner: set to Jun Omae
Status: newassigned

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  
    2626import pkg_resources
    28 from genshi.builder import tag
    3028from trac.core import *
    3129from trac.config import BoolOption, ChoiceOption, ListOption, PathOption
    3230from trac.env import ISystemInfoProvider
    3331from trac.util import arity
    3432from trac.util.datefmt import FixedOffset, utc
     33from trac.util.html import tag
    3534from trac.util.text import exception_to_unicode, shorten_line, to_unicode
    3635from trac.util.translation import _, domain_functions
    3736from trac.versioncontrol.api import Changeset, Node, Repository, \

comment:5 Changed 14 months ago by Ryan J Ollos

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 Changed 6 months ago by Peter Suter

Changes in comment:4 (or with comment:5 for compatibility) seem good to me.

comment:7 Changed 6 months ago by Jun Omae

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Thanks for the suggestion and reviews. Pushed the change in comment:5 ([d54f77082b03/mercurial-plugin]).

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jun Omae.
The resolution will be deleted.
to The owner will be changed from Jun Omae to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.