~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/controllers/annotate_ui.py

  • Committer: Francesco 'pr0gg3d' Del Degan
  • Date: 2011-08-08 20:58:09 UTC
  • mto: This revision was merged to the branch mainline in revision 454.
  • Revision ID: f.deldegan@pr0gg3d.net-20110808205809-n3eg73n80ymyd6kj
Fixes bug in annotate that occurs when file is zero-sized

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
                last_lineno = lineno
59
59
                last_line_revid = line_revid
60
60
 
 
61
        # Zero-size file. Return empty revisions.
 
62
        if last_lineno is None:
 
63
            return revisions
 
64
 
61
65
        # We never set a revspan for the last revision during the loop above, so set it here.
62
66
        revisions[last_lineno].revspan = lineno - last_lineno + 1
63
67