Merge lp:~joe.julian/trac-bzr/head-typo into lp:trac-bzr

Proposed by Joe Julian
Status: Merged
Merged at revision: 123
Proposed branch: lp:~joe.julian/trac-bzr/head-typo
Merge into: lp:trac-bzr
Diff against target: 12 lines (+1/-1)
1 file modified
tracbzr/backend.py (+1/-1)
To merge this branch: bzr merge lp:~joe.julian/trac-bzr/head-typo
Reviewer Review Type Date Requested Status
Martin von Gagern Approve
Review via email: mp+87846@code.launchpad.net

Description of the change

Fixes a typo in rev_older_than where 'len(heads)' is meant to be tested, but instead it tested 'len(s)' which raised an exception.

To post a comment you must log in.
Revision history for this message
Martin von Gagern (gagern) wrote :

The fix looks good to me, will merge it shortly.

I'm somewhat surprised that I didn't encounter any problems of this kind myself yet.
What user interface operation did trigger that backtrace for you? What version of trac?

review: Approve
Revision history for this message
Joe Julian (joe.julian) wrote :

Revision Log. I noticed it with just setting "back to" to 1 and hitting
"Update".

Trac 0.12

On 01/07/2012 11:49 AM, Martin von Gagern wrote:
> Review: Approve
>
> The fix looks good to me, will merge it shortly.
>
> I'm somewhat surprised that I didn't encounter any problems of this kind myself yet.
> What user interface operation did trigger that backtrace for you? What version of trac?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tracbzr/backend.py'
2--- tracbzr/backend.py 2010-11-01 13:40:19 +0000
3+++ tracbzr/backend.py 2012-01-07 10:05:26 +0000
4@@ -669,7 +669,7 @@
5 heads = branch2.repository.get_graph().heads(both)
6 else:
7 heads = both
8- if len(s) == 1:
9+ if len(heads) == 1:
10 return rrev2 in heads
11 # Bah, unrelated revisions. Fall back to comparing timestamps.
12 return (branch1.repository.get_revision(rrev1).timestamp <

Subscribers

People subscribed via source and target branches