Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

#12030 closed defect (fixed)

SubversionMergePropertyDiffRenderer with wrong mergeinfo leads a TypeError

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 0.12.7
Component: version control Version: 0.12.6
Severity: normal Keywords: svn
Cc: Branch:
Release Notes:

Fix a TypeError while rendering svn:mergeinfo with missing nodes.

API Changes:
Internal Changes:

Description

2015-04-10 15:47:40,442 Trac[changeset] WARNING: Diff rendering failed for property svn:mergeinfo with renderer SubversionMergePropertyDiffRenderer:
Traceback (most recent call last):
  File "/home/jun66j5/venv/trac/0.12.6/lib/python2.4/site-packages/trac/versioncontrol/web_ui/changeset.py", line 845, in render_property_diff
    options)
  File "/home/jun66j5/venv/trac/0.12.6/lib/python2.4/site-packages/trac/versioncontrol/svn_prop.py", line 367, in render_property_diff
    added_ni &= revs
TypeError: unsupported operand type(s) for &=: 'set' and 'list'

Attachments (0)

Change History (3)

comment:1 by Jun Omae, 10 years ago

Milestone: 1.0.60.12.7
Owner: set to Jun Omae
Status: newassigned

The issue is introduced in [13018] and would be fixed by the following. I'll post with unit tests later.

  • trac/versioncontrol/svn_prop.py

    diff --git a/trac/versioncontrol/svn_prop.py b/trac/versioncontrol/svn_prop.py
    index 8a4e1c1..7b425d7 100644
    a b class SubversionMergePropertyDiffRenderer(Component):  
    363363                revs = set(changed_revs[spath])
    364364                added &= revs
    365365                removed &= revs
    366             if added or removed:
    367366                added_ni &= revs
    368367                removed_ni &= revs
     368            if added or removed:
    369369                if new_spath:
    370370                    status = _(" (added)")
    371371                else:

comment:2 by Jun Omae, 10 years ago

Proposed changes in [1b59e12ac/jomae.git] (jomae.git@t12030).

Last edited 10 years ago by Jun Omae (previous) (diff)

comment:3 by Jun Omae, 10 years ago

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

Committed in [13978] and merged in [13979:13980].

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.