Unconverted branch.has_revision in check

Wouter van Heyst larstiq at larstiq.dyndns.org
Thu Mar 2 16:28:30 GMT 2006


Hi,

I just tried to run a bzr check on a branch after an sftp push to it
segfaulted, and got the following exception:

bzr: ERROR: exceptions.AttributeError: 'BzrBranch' object has no attribute 'has_revision'
  at /home/larstiq/src/bzr.dev/bzrlib/check.py line 172
  in check_one_rev

The code in question:

    if self.branch.has_revision(parent):

Which looks like it should be self.branch.repository.has_revision instead.
My question now is, how should this be tested? There is at least one
untested codepath in check.py, who knows what is left. Just add them as
we encounter them? Or is there a way to do some testing after an api
change to see who still uses the old approach?

Wouter van Heyst




More information about the bazaar mailing list