Edgewall Software

Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#11346 closed defect (fixed)

The TracLinks [1,3:4] does not show the correct range of revisions

Reported by: Ryan J Ollos Owned by: Jun Omae
Priority: normal Milestone: 0.12.6
Component: version control/log view Version: 1.0-stable
Severity: normal Keywords: traclinks
Cc: Branch:
Release Notes:

Fix log: link with revision ranges included oldest wrongly showing HEAD revision.

API Changes:
Internal Changes:


[2,4:5] and [2,4-5] are correct, however [1,4:5] and [1,4-5] show r1 and the range HEAD revision through rHEAD - n + 4, where n is the number from the preferences form Show at most n revisions per page.

Attachments (0)

Change History (7)

comment:1 by Jun Omae, 10 years ago

Milestone: next-stable-1.0.x1.0.2
Owner: set to Jun Omae
Status: newassigned

[1-2] has the same issue.

Proposed changes are the following patch and functional tests will be added later. Also, 0.12-stable have the same issue. I'll backport.

  • trac/versioncontrol/web_ui/log.py

    diff --git a/trac/versioncontrol/web_ui/log.py b/trac/versioncontrol/web_ui/log.py
    index 374d84d..8898919 100644
    a b class LogModule(Component):  
    147147                                if rev != nrev: # no, we need a separator
    148148                                    yield (np, nrev, None)
    149149                            yield node_history[0]
    150                         prevpath = node_history[-1][0] # follow copy
    151                         b = repos.previous_rev(rev)
    152150                        if len(node_history) > 1:
    153151                            expected_next_item = node_history[-1]
     152                            prevpath = expected_next_item[0]  # follow copy
     153                            b = expected_next_item[1]
    154154                        else:
    155155                            expected_next_item = None
     156                            break  # no more older revisions
    156157                if expected_next_item:
    157158                    yield (expected_next_item[0], expected_next_item[1], None)
    158159        else:

comment:2 by Ryan J Ollos, 10 years ago

It looks good, thanks for fixing it! At least for the cases I tested, it looks like the break is the primary fix for the issue, and the other two changes are refactoring / optimization.

comment:3 by Jun Omae, 10 years ago

Thanks for the feedback! log:jomae.git:ticket11346_0.12.6dev includes functional tests. I'll push it to 0.12-stable branch and merge into 1.0-stable and trunk.

comment:4 by Jun Omae, 10 years ago

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

Committed it to 0.12-stable in [12220] and merged to 1.0-stable and trunk in [12221,12222].

comment:5 by Ryan J Ollos, 9 years ago

Keywords: traclink added; traclinks removed

comment:6 by Ryan J Ollos, 9 years ago

Keywords: traclinks added; traclink removed

comment:7 by Ryan J Ollos, 9 years ago

Component: version control/changeset viewversion control/log view

Modify Ticket

Change Properties
Set your email in Preferences
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.