[MERGE] Fix in Knit._check_should_delta

John Arbash Meinel john at arbash-meinel.com
Thu Jan 29 23:11:58 GMT 2009


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

In my recent patch to _check_should_delta, it turns out that I have a
small bug when a parent is not present (is a ghost). I messed up the
python exception notation by writing:

  except RevisionNotPresent, KeyError:

rather than

  except (RevisionNotPresent, KeyError), e:

(Note that the former only catches RevisionNotPresent and assigns it to
the variable KeyError).

Be thankful that they are changing this in py3k to make it harder to
make this mistake. (IIRC there was a bug in bzr-svn that caused all
kinds of confusion, because it rewrote bzrlib.errors.BzrError whenever
sqlite could not be found.)

Anyway, I looked around for tests of _check_should_delta, but didn't
find any, so this still passes the "does not reduce test coverage", even
if it would be nice to add a test for this.

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

iEYEARECAAYFAkmCN70ACgkQJdeBCYSNAAPSBQCeNmV41MgUke5k4vjO1+brXsys
vZgAoLEjwz4Ta1u7KnfZa521HHDMh6hA
=+z4d
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: knit_check_should_delta.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20090129/04dac2d5/attachment.diff 


More information about the bazaar mailing list