Edgewall Software
Modify

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)

changeset_merge_diff_templating.png (26.6 KB ) - added by anonymous 7 years ago.

Download all attachments as: .zip

Change History (8)

by anonymous, 7 years ago

comment:1 by anonymous, 7 years ago

  • 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 by Jun Omae, 7 years ago

Milestone: 1.3.3
Version: 1.3dev

Thanks for the reporting.

comment:3 by Jun Omae, 7 years ago

Keywords: mercurial added

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

comment:4 by Jun Omae, 7 years ago

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  
    2525
    2626import pkg_resources
    2727
    28 from genshi.builder import tag
    29 
    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 by Ryan J Ollos, 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 Peter Suter, 6 years ago

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

comment:7 by Jun Omae, 6 years ago

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
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
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.