Merge lp://staging/~pr0gg3d/loggerhead/annotate_zero_size_820065 into lp://staging/loggerhead

Proposed by Francesco Del Degan
Status: Merged
Approved by: Gavin Panella
Approved revision: 456
Merged at revision: 454
Proposed branch: lp://staging/~pr0gg3d/loggerhead/annotate_zero_size_820065
Merge into: lp://staging/loggerhead
Prerequisite: lp://staging/~pr0gg3d/loggerhead/annotate_comment_notpresent_812583
Diff against target: 46 lines (+16/-2)
2 files modified
loggerhead/controllers/annotate_ui.py (+4/-0)
loggerhead/tests/test_controllers.py (+12/-2)
To merge this branch: bzr merge lp://staging/~pr0gg3d/loggerhead/annotate_zero_size_820065
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Review via email: mp+70885@code.staging.launchpad.net

This proposal supersedes a proposal from 2011-08-08.

Commit message

Don't break when annotating a zero-sized file.

Description of the change

This fixes #820065

The bug occurs when trying to annotate a zero-sized file.
The last_lineno is None, and an exception is raised at the end of method.

To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote : Posted in a previous version of this proposal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/8/2011 11:09 PM, Francesco Del Degan wrote:
> Francesco Del Degan has proposed merging
> lp:~pr0gg3d/loggerhead/annotate_zero_size_820065 into lp:loggerhead.
>
> Requested reviews: Loggerhead Reviewers (loggerhead-reviewers)
> Related bugs: Bug #820065 in loggerhead: "TypeError: unsupported
> operand type(s) for -: 'int' and 'NoneType'"
> https://bugs.launchpad.net/loggerhead/+bug/820065
>
> For more details, see:
> https://code.launchpad.net/~pr0gg3d/loggerhead/annotate_zero_size_820065/+merge/70789
>
> This fixes #820065
>
> The bug occurs when trying to annotate a zero-sized file. The
> last_lineno is None, and an exception is raised at the end of
> method.
>
>

Good change, but again, it would be nice to have a simple test for this.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5BBXsACgkQJdeBCYSNAAPa1gCgsUeNvuKXWegQldo8I3bNUGGD
iz8AoMPb5kLkd+99xuxXSZRboFZ0rWJA
=wL8n
-----END PGP SIGNATURE-----

456. By Francesco Del Degan

Test fixture

Revision history for this message
Gavin Panella (allenap) wrote :

This seems sane to me. Do you need someone to land it for you?

review: Approve
Revision history for this message
Francesco Del Degan (pr0gg3d) wrote :

Yes, i don't have the rights to merge into main branch, the prerequisite branch has been merged two days ago.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches