I think I like the concept of splitting these out into something more like objects.
I don't want to hold this hostage but it seems like this would be a good moment to add a little developer documentation to the architectural guide describing at a high level how fetch works.
+ def test_fetch_everything_backwards_compat(self):
+ """Can fetch with EverythingResult even when the server does not have
+ the Repository.get_stream_2.3 verb.
+ """
+ local = self.make_branch('local')
+ builder = self.make_branch_builder('remote')
+ builder.build_commit(message="Commit.")
+ remote_branch_url = self.smart_server.get_url() + 'remote'
+ remote_branch = bzrdir.BzrDir.open(remote_branch_url).open_branch()
+ self.hpss_calls = []
+ local.repository.fetch(remote_branch.repository,
+ fetch_spec=graph.EverythingResult(remote_branch.repository))
+
I don't understand how this tests that the server doesn't have this verb.
=== modified file 'doc/en/release-notes/bzr-2.3.txt'
--- doc/en/release-notes/bzr-2.3.txt 2010-12-14 23:32:28 +0000
+++ doc/en/release-notes/bzr-2.3.txt 2010-12-15 05:36:46 +0000
@@ -158,6 +158,11 @@
crashes when encountering private bugs (they are just displayed as such).
(Vincent Ladeuil, #354985)
+* The ``revision_id`` parameter of
+ ``Repository.search_missing_revision_ids`` and
+ ``InterRepository.search_missing_revision_ids`` is deprecated. It is
+ replaced by the ``revision_ids`` parameter. (Andrew Bennetts)
+
Internals
*********
spiv said on irc that he's testing this; if it turns out to be faster in practice that should be mentioned too. But I guess this patch alone won't change performance.
I think I like the concept of splitting these out into something more like objects.
I don't want to hold this hostage but it seems like this would be a good moment to add a little developer documentation to the architectural guide describing at a high level how fetch works.
+ def get_network_ struct( self): self._recipe[ 1]) self._recipe[ 2]) _recipe[ 3]) (start_ keys, stop_keys, count)))
+ start_keys = ' '.join(
+ stop_keys = ' '.join(
+ count = str(self.
+ return (self._recipe[0], '\n'.join(
+
rather than adhoc encoding, could you send it as bencode?
+ medium. _remember_ remote_ is_before( (2, 3))
out of scope for this, but concluding it's older than 2.3 because it doesn't support this particular operation is really not accurate.
+ """See InterRepository .searcH_ missing_ revision_ ids()." ""
typo.
+ def test_fetch_ everything_ backwards_ compat( self): get_stream_ 2.3 verb. branch( 'local' ) branch_ builder( 'remote' ) build_commit( message= "Commit. ") server. get_url( ) + 'remote' BzrDir. open(remote_ branch_ url).open_ branch( ) y.fetch( remote_ branch. repository, graph.Everythin gResult( remote_ branch. repository) )
+ """Can fetch with EverythingResult even when the server does not have
+ the Repository.
+ """
+ local = self.make_
+ builder = self.make_
+ builder.
+ remote_branch_url = self.smart_
+ remote_branch = bzrdir.
+ self.hpss_calls = []
+ local.repositor
+ fetch_spec=
+
I don't understand how this tests that the server doesn't have this verb.
=== modified file 'doc/en/ release- notes/bzr- 2.3.txt' release- notes/bzr- 2.3.txt 2010-12-14 23:32:28 +0000 release- notes/bzr- 2.3.txt 2010-12-15 05:36:46 +0000
--- doc/en/
+++ doc/en/
@@ -158,6 +158,11 @@
crashes when encountering private bugs (they are just displayed as such).
(Vincent Ladeuil, #354985)
+* The ``revision_id`` parameter of search_ missing_ revision_ ids`` and ry.search_ missing_ revision_ ids`` is deprecated. It is
+ ``Repository.
+ ``InterReposito
+ replaced by the ``revision_ids`` parameter. (Andrew Bennetts)
+
Internals
*********
spiv said on irc that he's testing this; if it turns out to be faster in practice that should be mentioned too. But I guess this patch alone won't change performance.