Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

#1826 closed defect (fixed)

timeline bug when handling a subset of a repository

Reported by: ndelon@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: timeline Version: devel
Severity: normal Keywords: timeline repository subset
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When trac is handling a subset of a svn repository, only the last changeset is shown in the timeline. It seems to be caused by a bad list index check in the previous_rev method of the "SubversionRepository" class. The following patch fixed the problem for me.

Index: trac/versioncontrol/svn_fs.py
===================================================================
--- trac/versioncontrol/svn_fs.py       (revision 2015)
+++ trac/versioncontrol/svn_fs.py       (working copy)
@@ -233,7 +233,7 @@
         if self.scope == '/':
             return rev - 1
         idx = self.history.index(rev)
-        if idx > 0:
+        if idx + 1 < len(self.history):
             return self.history[idx + 1]
         return None

Attachments (1)

trac-previous_rev.diff (449 bytes ) - added by ndelon@… 19 years ago.
bug fix patch

Download all attachments as: .zip

Change History (2)

by ndelon@…, 19 years ago

Attachment: trac-previous_rev.diff added

bug fix patch

comment:1 by Jonas Borgström, 19 years ago

Resolution: fixed
Status: newclosed

Good catch, applied in [2019].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström 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.