[MERGE] Fix error construction in KnitVersionedFiles

John Arbash Meinel john at arbash-meinel.com
Mon Sep 29 15:43:48 BST 2008


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

Martin Pool wrote:
> This fixes the 'shallow' part of bug 270738, which is that the exception
> constructor tries to use a field that no longer exists.  I think the real bug
> the same as in #246880, and I'll do a separate patch for it.
> 
> 
> ------------------------------------------------------------------------
> 
> # Bazaar merge directive format 2 (Bazaar 0.90)
> # revision_id: mbp at sourcefrog.net-20080929061127-xp4wtsyx9div0brq
> # target_branch: http://bazaar-vcs.org/bzr/bzr.dev
> # testament_sha1: 11672a77f96aeedb5a5acd07b6cb438cb071bb69
> # timestamp: 2008-09-29 16:50:01 +1000
> # source_branch: http://sourcefrog.net/bzr/270738-stacking
> # base_revision_id: pqm at pqm.ubuntu.com-20080927233809-mlgk5zkwowkb8q8z
> # 
> # Begin patch
> === modified file 'bzrlib/knit.py'
> --- bzrlib/knit.py	2008-09-11 04:16:24 +0000
> +++ bzrlib/knit.py	2008-09-29 06:11:27 +0000
> @@ -1433,7 +1433,9 @@
>                  yield line, key
>              keys.difference_update(source_keys)
>          if keys:
> -            raise RevisionNotPresent(keys, self.filename)
> +            # XXX: strictly the second parameter is meant to be the file id
> +            # but it's not easily accessible here.
> +            raise RevisionNotPresent(keys, repr(self))
>          pb.update('Walking content.', total, total)
>  
>      def _make_line_delta(self, delta_seq, new_content):

BB:approve

Though I'll comment we often now have useless information when we get
stuff like RevisionNotPresent. We don't know what index is missing it,
or what file_id, etc we are looking for.
This particular case might be okay, as the 'keys' parameter might give
us enough information. (If it is a simple revision_id it is either an
inventory or a revision text, if it is a tuple it is in the .tix, etc.)

I don't have a good answer for it, as it happened when we factored out
the "KnitAccess" information.

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

iEYEARECAAYFAkjg6aQACgkQJdeBCYSNAAP3jACdFoo4pide+sX6bGykzA/BVuLP
sLAAoLvtUwa7GeE/Wvqr7rkBiJQmeDEM
=g4iU
-----END PGP SIGNATURE-----



More information about the bazaar mailing list