[MERGE] Create and use a RPC call to create branches on bzr servers rather than using VFS calls.

John Arbash Meinel john at arbash-meinel.com
Tue Feb 24 15:19:43 GMT 2009


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

Robert Collins wrote:
> This  test reduces RPC call made during pushing of new branches and
> stacked branches to bzr: servers; for trivial branches 24 less calls are
> made, and for trivial stacked branches 23 less calls are made.
> 
> Yay.
> 
> 
> 

+        # Creating on a remote bzr dir.
+        # 2) try direct creation via RPC
+        path = a_bzrdir._path_for_remote_call(a_bzrdir._client)
+        verb = 'BzrDir.create_branch'
+        try:
+            response = a_bzrdir._call(verb, path, network_name)
+        except errors.UnknownSmartMethod:
+            # Fallback - use vfs methods
+            return self._vfs_initialize(a_bzrdir)
+        if response[0] != 'ok':
+            raise errors.UnexpectedSmartServerResponse(response)


^- Can we make sure that when the fallback code path gets used we get
something put into ~/.bzr.log?

Perhaps this is easiest to put it where errors.UnknownSmartMessage is
being raised. But I think it is important to have runtime documentation
that a fallback code path is being used.

John
=:->

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

iEYEARECAAYFAkmkEA8ACgkQJdeBCYSNAAMSBwCgjBEgg4NwK91QykYoMuvNSvn/
uYEAn2cNw4a2jiYAa+3ZXimX9lUxl8p9
=Osty
-----END PGP SIGNATURE-----




More information about the bazaar mailing list