Code review comment for lp:~roadmr/isitdeployable/revision-disappeared-ohnoes

Revision history for this message
Jonathan Hartley (tartley) wrote :

The modified functon is also called here:

https://bazaar.launchpad.net/~roadmr/isitdeployable/revision-disappeared-ohnoes/view/head:/revtracker/tasks.py#L264

and the return value from that is used in iter_revisions(), here:

https://bazaar.launchpad.net/~roadmr/isitdeployable/revision-disappeared-ohnoes/view/head:/revtracker/tasks.py#L352

If our modification had returned None, we could guard the access to tip_revision.revno with:

        tip_revision = self.tip_revision()
+ if not tip_revision:
+ return
        if (start_revision is not None and
                tip_revision.revno <= start_revision.revno):
            return

It seems like if this were to occur, then iter_revisions has been asked to iterate over a range starting with a tip that doesn't exist, so returning without yielding anything, an empty generator, seems like the right thing to do maybe?

« Back to merge proposal