Andrew Bennetts wrote:
> Andrew Bennetts has proposed merging lp:~spiv/bzr/remove-dead-chk-code into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>
> There's a large code-path in StreamSource._get_inventory_stream that is totally
> unused in current bzrlib. Unsurprisingly, it's also broken: there's no
> _find_revision_outside_set method anymore. So this branch deletes it (and
> replaces it with an assertion).
>
> For good measure it also fixes a trivial bug in RemoteRepositoryFormat to make
> sure that the .supports_chk attribute is accurate.
>
> -Andrew.
>
>
>
Actually, it isn't totally unused. It is used to copy data from a --dev7
format branch to a --2a format. Which happens to be broken as you say. :)
And I'm not positive, but I think this:
> +++ bzrlib/repository.py 2009-07-10 04:49:56 +0000
> @@ -4226,12 +4226,9 @@
>
> def _get_inventory_stream(self, revision_ids):
> from_format = self.from_repository._format
> - if (from_format.supports_chks and self.to_format.supports_chks
> - and (from_format._serializer == self.to_format._serializer)):
> - # Both sides support chks, and they use the same serializer, so it
> - # is safe to transmit the chk pages and inventory pages across
> - # as-is.
> - return self._get_chk_inventory_stream(revision_ids)
> + if (from_format.supports_chks and self.to_format.supports_chks):
> + raise AssertionError(
> + "This StreamSource should not be used for chk->chk fetches.")
> elif (not from_format.supports_chks):
> # Source repository doesn't support chks. So we can transmit the
> # inventories 'as-is' and either they are just accepted on the
^- actually should be "format.supports_chks or to_format.supports_chks".
Perhaps not, though.
review approve
merge approve
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andrew Bennetts wrote: _get_inventory_ stream that is totally outside_ set method anymore. So this branch deletes it (and yFormat to make
> Andrew Bennetts has proposed merging lp:~spiv/bzr/remove-dead-chk-code into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>
> There's a large code-path in StreamSource.
> unused in current bzrlib. Unsurprisingly, it's also broken: there's no
> _find_revision_
> replaces it with an assertion).
>
> For good measure it also fixes a trivial bug in RemoteRepositor
> sure that the .supports_chk attribute is accurate.
>
> -Andrew.
>
>
>
Actually, it isn't totally unused. It is used to copy data from a --dev7
format branch to a --2a format. Which happens to be broken as you say. :)
And I'm not positive, but I think this:
> +++ bzrlib/ repository. py 2009-07-10 04:49:56 +0000 stream( self, revision_ids): repository. _format supports_ chks and self.to_ format. supports_ chks _serializer == self.to_ format. _serializer) ): chk_inventory_ stream( revision_ ids) supports_ chks and self.to_ format. supports_ chks): supports_ chks):
> @@ -4226,12 +4226,9 @@
>
> def _get_inventory_
> from_format = self.from_
> - if (from_format.
> - and (from_format.
> - # Both sides support chks, and they use the same serializer, so it
> - # is safe to transmit the chk pages and inventory pages across
> - # as-is.
> - return self._get_
> + if (from_format.
> + raise AssertionError(
> + "This StreamSource should not be used for chk->chk fetches.")
> elif (not from_format.
> # Source repository doesn't support chks. So we can transmit the
> # inventories 'as-is' and either they are just accepted on the
^- actually should be "format. supports_ chks or to_format. supports_ chks".
Perhaps not, though.
review approve
merge approve
John enigmail. mozdev. org
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkp XeiEACgkQJdeBCY SNAAN73ACfSAzYN c+52gN0ElTHVQs8 llOE 36YJB9lqORPf+ pmvm
pS0AniDM6pkVcfd
=ytfn
-----END PGP SIGNATURE-----