Skip to content

Commit

Permalink
Fix discontinuity detection in revision traversal
Browse files Browse the repository at this point in the history
  • Loading branch information
s1341 committed Dec 17, 2013
1 parent 186efe0 commit 360bb55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/static/js/revisioncache.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ $.Class("RevisionCache",
var direction_edges = direction ? current.previous : current.next;
for (var granularity in Revision.granularities) {
if (Math.abs(delta_revnum) >= Revision.granularities[granularity]) {
console.log(delta_revnum, to.revnum, current.revnum);
/*
* the delta is larger than the granularity, let's use the granularity
*TODO: what happens if we DON'T have the edge?
Expand All @@ -258,7 +257,8 @@ $.Class("RevisionCache",
// next granularity level. BUT, if we are at the lowest
// granularity and don't have an edge, we've reached a DISCONTINUITY
// and can no longer continue.
found_discontinuity = true;
if (Revision.granularities[granularity] == 1)
found_discontinuity = true;
}
}
}
Expand Down

0 comments on commit 360bb55

Please sign in to comment.